{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "64c956bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import torch.nn as nn\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import scipy.io"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c1682ede",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define the LEMCell\n",
    "class LEMCell(nn.Module):\n",
    "    def __init__(self, ninp, nhid, dt):\n",
    "        super(LEMCell, self).__init__()\n",
    "        self.ninp = ninp\n",
    "        self.nhid = nhid\n",
    "        self.dt = dt\n",
    "        self.inp2hid = nn.Linear(ninp, 4 * nhid)\n",
    "        self.hid2hid = nn.Linear(nhid, 3 * nhid)\n",
    "        self.transform_z = nn.Linear(nhid, nhid)\n",
    "        self.reset_parameters()\n",
    "\n",
    "    def reset_parameters(self):\n",
    "        std = 1.0 / np.sqrt(self.nhid)\n",
    "        for w in self.parameters():\n",
    "            w.data.uniform_(-std, std)\n",
    "\n",
    "    def forward(self, x, y, z):\n",
    "        transformed_inp = self.inp2hid(x)\n",
    "        transformed_hid = self.hid2hid(y)\n",
    "        i_dt1, i_dt2, i_z, i_y = transformed_inp.chunk(4, 1)\n",
    "        h_dt1, h_dt2, h_y = transformed_hid.chunk(3, 1)\n",
    "\n",
    "        ms_dt_bar = self.dt * torch.sigmoid(i_dt1 + h_dt1)\n",
    "        ms_dt = self.dt * torch.sigmoid(i_dt2 + h_dt2)\n",
    "\n",
    "        z = (1. - ms_dt) * z + ms_dt * torch.tanh(i_y + h_y)\n",
    "        y = (1. - ms_dt_bar) * y + ms_dt_bar * torch.tanh(self.transform_z(z) + i_z)\n",
    "\n",
    "        return y, z\n",
    "\n",
    "# Define the LEM model\n",
    "class LEM(nn.Module):\n",
    "    def __init__(self, ninp, nhid, nout, dt=1.):\n",
    "        super(LEM, self).__init__()\n",
    "        self.nhid = nhid\n",
    "        self.cell = LEMCell(ninp, nhid, dt)\n",
    "        self.classifier = nn.Linear(nhid, nout)\n",
    "        self.init_weights()\n",
    "\n",
    "    def init_weights(self):\n",
    "        for name, param in self.named_parameters():\n",
    "            if 'classifier' in name and 'weight' in name:\n",
    "                nn.init.kaiming_normal_(param.data)\n",
    "\n",
    "    def forward(self, input):\n",
    "        y = input.data.new(input.size(1), self.nhid).zero_()\n",
    "        z = input.data.new(input.size(1), self.nhid).zero_()\n",
    "        for x in input:\n",
    "            y, z = self.cell(x, y, z)\n",
    "        out = self.classifier(y)\n",
    "        return out\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a982afa5",
   "metadata": {},
   "source": [
    "### PINN data importing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "79da65b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "# importing data\n",
    "\n",
    "# Load the .mat file\n",
    "mat_data = scipy.io.loadmat('burg.mat')\n",
    "\n",
    "# Access the variables stored in the .mat file\n",
    "# The variable names in the .mat file become keys in the loaded dictionary\n",
    "x = mat_data['x']\n",
    "t = mat_data['t']\n",
    "u = mat_data['u1']\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bbac9f8e",
   "metadata": {},
   "source": [
    "### Exact Solution data importing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "9967dbae",
   "metadata": {},
   "outputs": [],
   "source": [
    "# importing data\n",
    "\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import numpy as np\n",
    "import time\n",
    "import scipy.io\n",
    "\n",
    "# Load the .mat file\n",
    "mat_data = scipy.io.loadmat('burgers_shock.mat')\n",
    "\n",
    "# Access the variables stored in the .mat file\n",
    "# The variable names in the .mat file become keys in the loaded dictionary\n",
    "x = mat_data['x']\n",
    "t = mat_data['t']\n",
    "u_1 = mat_data['usol']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "83a01b14",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(256, 100)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Set random seed for reproducibility\n",
    "#torch.manual_seed(42)\n",
    "\n",
    "# Toy problem data\n",
    "input_size = 256\n",
    "hidden_size = 32\n",
    "output_size = 256\n",
    "sequence_length = 79\n",
    "batch_size = 1\n",
    "num_epochs = 20000\n",
    "\n",
    "# Set random seed for reproducibility\n",
    "#torch.manual_seed(42)\n",
    "u[:, 0:100].shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0496e4a4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test data shape (256,)\n",
      "input data shape (256, 79)\n",
      "Target data shape (256, 79)\n",
      "input tensor shape torch.Size([1, 79, 256])\n",
      "Target tensor shape torch.Size([1, 79, 256])\n"
     ]
    }
   ],
   "source": [
    "input_data = u[:,0:79]\n",
    "target_data = u[:,1:80]\n",
    "\n",
    "test_data = u[:,79]\n",
    "#test_target = u[:,80:100]\n",
    "\n",
    "print(\"test data shape\", test_data.shape)\n",
    "#print(\"test target shape\", test_target.shape)\n",
    "\n",
    "print(\"input data shape\",input_data.shape)\n",
    "print(\"Target data shape\",target_data.shape)\n",
    "\n",
    "# Convert data to tensors\n",
    "input_tensor = torch.tensor(input_data.T).view(batch_size, sequence_length, input_size).float()\n",
    "target_tensor = torch.tensor(target_data.T).view(batch_size, sequence_length, output_size).float()\n",
    "\n",
    "print(\"input tensor shape\",input_tensor.shape)\n",
    "print(\"Target tensor shape\",target_tensor.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "718d5b86",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Convert test data to tensors\n",
    "test_tensor = torch.tensor(test_data.T).view(batch_size, 1, input_size).float()\n",
    "#test_target_tensor = torch.tensor(test_target.T).view(batch_size, 20, output_size).float()\n",
    "target_tensor = torch.squeeze(target_tensor)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "d733ab9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 10/20000, Loss: 0.3632635772228241\n",
      "Epoch: 20/20000, Loss: 0.3041091263294220\n",
      "Epoch: 30/20000, Loss: 0.2450173050165176\n",
      "Epoch: 40/20000, Loss: 0.1882142722606659\n",
      "Epoch: 50/20000, Loss: 0.1358413994312286\n",
      "Epoch: 60/20000, Loss: 0.0920492634177208\n",
      "Epoch: 70/20000, Loss: 0.0604817606508732\n",
      "Epoch: 80/20000, Loss: 0.0399516820907593\n",
      "Epoch: 90/20000, Loss: 0.0275592524558306\n",
      "Epoch: 100/20000, Loss: 0.0203636903315783\n",
      "Epoch: 110/20000, Loss: 0.0163965262472630\n",
      "Epoch: 120/20000, Loss: 0.0141055071726441\n",
      "Epoch: 130/20000, Loss: 0.0125281428918242\n",
      "Epoch: 140/20000, Loss: 0.0112330699339509\n",
      "Epoch: 150/20000, Loss: 0.0100468685850501\n",
      "Epoch: 160/20000, Loss: 0.0089271487668157\n",
      "Epoch: 170/20000, Loss: 0.0078733600676060\n",
      "Epoch: 180/20000, Loss: 0.0068998616188765\n",
      "Epoch: 190/20000, Loss: 0.0060198819264770\n",
      "Epoch: 200/20000, Loss: 0.0052409833297133\n",
      "Epoch: 210/20000, Loss: 0.0045633604750037\n",
      "Epoch: 220/20000, Loss: 0.0039836396463215\n",
      "Epoch: 230/20000, Loss: 0.0034939160104841\n",
      "Epoch: 240/20000, Loss: 0.0030838914681226\n",
      "Epoch: 250/20000, Loss: 0.0027426385786384\n",
      "Epoch: 260/20000, Loss: 0.0024598729796708\n",
      "Epoch: 270/20000, Loss: 0.0022266651503742\n",
      "Epoch: 280/20000, Loss: 0.0020352413412184\n",
      "Epoch: 290/20000, Loss: 0.0018784872954711\n",
      "Epoch: 300/20000, Loss: 0.0017500830581412\n",
      "Epoch: 310/20000, Loss: 0.0016445484943688\n",
      "Epoch: 320/20000, Loss: 0.0015573946293443\n",
      "Epoch: 330/20000, Loss: 0.0014850497245789\n",
      "Epoch: 340/20000, Loss: 0.0014246908249334\n",
      "Epoch: 350/20000, Loss: 0.0013740730937570\n",
      "Epoch: 360/20000, Loss: 0.0013313970994204\n",
      "Epoch: 370/20000, Loss: 0.0012952077668160\n",
      "Epoch: 380/20000, Loss: 0.0012643246445805\n",
      "Epoch: 390/20000, Loss: 0.0012377868406475\n",
      "Epoch: 400/20000, Loss: 0.0012148095993325\n",
      "Epoch: 410/20000, Loss: 0.0011947526363656\n",
      "Epoch: 420/20000, Loss: 0.0011770926648751\n",
      "Epoch: 430/20000, Loss: 0.0011614015093073\n",
      "Epoch: 440/20000, Loss: 0.0011473302729428\n",
      "Epoch: 450/20000, Loss: 0.0011345929233357\n",
      "Epoch: 460/20000, Loss: 0.0011229556985199\n",
      "Epoch: 470/20000, Loss: 0.0011122274445370\n",
      "Epoch: 480/20000, Loss: 0.0011022504186258\n",
      "Epoch: 490/20000, Loss: 0.0010928956326097\n",
      "Epoch: 500/20000, Loss: 0.0010841271141544\n",
      "Epoch: 510/20000, Loss: 0.0010869180550799\n",
      "Epoch: 520/20000, Loss: 0.0010710157221183\n",
      "Epoch: 530/20000, Loss: 0.0010599575471133\n",
      "Epoch: 540/20000, Loss: 0.0010525851976126\n",
      "Epoch: 550/20000, Loss: 0.0010453345021233\n",
      "Epoch: 560/20000, Loss: 0.0010379420127720\n",
      "Epoch: 570/20000, Loss: 0.0010308817727491\n",
      "Epoch: 580/20000, Loss: 0.0010239271214232\n",
      "Epoch: 590/20000, Loss: 0.0010170701425523\n",
      "Epoch: 600/20000, Loss: 0.0010102672968060\n",
      "Epoch: 610/20000, Loss: 0.0010035096202046\n",
      "Epoch: 620/20000, Loss: 0.0009967802325264\n",
      "Epoch: 630/20000, Loss: 0.0009900638833642\n",
      "Epoch: 640/20000, Loss: 0.0009833468357101\n",
      "Epoch: 650/20000, Loss: 0.0009766158182174\n",
      "Epoch: 660/20000, Loss: 0.0009698575595394\n",
      "Epoch: 670/20000, Loss: 0.0009630598942749\n",
      "Epoch: 680/20000, Loss: 0.0009562108898535\n",
      "Epoch: 690/20000, Loss: 0.0009492989629507\n",
      "Epoch: 700/20000, Loss: 0.0009423139854334\n",
      "Epoch: 710/20000, Loss: 0.0009352482738905\n",
      "Epoch: 720/20000, Loss: 0.0009295775089413\n",
      "Epoch: 730/20000, Loss: 0.0009284922853112\n",
      "Epoch: 740/20000, Loss: 0.0009197911713272\n",
      "Epoch: 750/20000, Loss: 0.0009065335616469\n",
      "Epoch: 760/20000, Loss: 0.0008988722111098\n",
      "Epoch: 770/20000, Loss: 0.0008910876349546\n",
      "Epoch: 780/20000, Loss: 0.0008830207516439\n",
      "Epoch: 790/20000, Loss: 0.0008749881526455\n",
      "Epoch: 800/20000, Loss: 0.0008668668451719\n",
      "Epoch: 810/20000, Loss: 0.0008586111362092\n",
      "Epoch: 820/20000, Loss: 0.0008502141572535\n",
      "Epoch: 830/20000, Loss: 0.0008416779455729\n",
      "Epoch: 840/20000, Loss: 0.0008329969132319\n",
      "Epoch: 850/20000, Loss: 0.0008241708856076\n",
      "Epoch: 860/20000, Loss: 0.0008151990477927\n",
      "Epoch: 870/20000, Loss: 0.0008060820982791\n",
      "Epoch: 880/20000, Loss: 0.0007968208519742\n",
      "Epoch: 890/20000, Loss: 0.0007874169969000\n",
      "Epoch: 900/20000, Loss: 0.0007778826984577\n",
      "Epoch: 910/20000, Loss: 0.0007713963277638\n",
      "Epoch: 920/20000, Loss: 0.0007634674548171\n",
      "Epoch: 930/20000, Loss: 0.0007496857433580\n",
      "Epoch: 940/20000, Loss: 0.0007392412517220\n",
      "Epoch: 950/20000, Loss: 0.0007285801111721\n",
      "Epoch: 960/20000, Loss: 0.0007180050015450\n",
      "Epoch: 970/20000, Loss: 0.0007075281464495\n",
      "Epoch: 980/20000, Loss: 0.0006970377871767\n",
      "Epoch: 990/20000, Loss: 0.0006864079623483\n",
      "Epoch: 1000/20000, Loss: 0.0006756967632100\n",
      "Epoch: 1010/20000, Loss: 0.0006649101269431\n",
      "Epoch: 1020/20000, Loss: 0.0006540533504449\n",
      "Epoch: 1030/20000, Loss: 0.0006431319052354\n",
      "Epoch: 1040/20000, Loss: 0.0006321558030322\n",
      "Epoch: 1050/20000, Loss: 0.0006211349973455\n",
      "Epoch: 1060/20000, Loss: 0.0006100788596086\n",
      "Epoch: 1070/20000, Loss: 0.0005990054341964\n",
      "Epoch: 1080/20000, Loss: 0.0005889454623684\n",
      "Epoch: 1090/20000, Loss: 0.0005987021722831\n",
      "Epoch: 1100/20000, Loss: 0.0005749659612775\n",
      "Epoch: 1110/20000, Loss: 0.0005577919073403\n",
      "Epoch: 1120/20000, Loss: 0.0005445379647426\n",
      "Epoch: 1130/20000, Loss: 0.0005327964900061\n",
      "Epoch: 1140/20000, Loss: 0.0005217983853072\n",
      "Epoch: 1150/20000, Loss: 0.0005109311314300\n",
      "Epoch: 1160/20000, Loss: 0.0005000717937946\n",
      "Epoch: 1170/20000, Loss: 0.0004893533186987\n",
      "Epoch: 1180/20000, Loss: 0.0004787210782524\n",
      "Epoch: 1190/20000, Loss: 0.0004681957943831\n",
      "Epoch: 1200/20000, Loss: 0.0004577854706440\n",
      "Epoch: 1210/20000, Loss: 0.0004474987508729\n",
      "Epoch: 1220/20000, Loss: 0.0004373445990495\n",
      "Epoch: 1230/20000, Loss: 0.0004273316299077\n",
      "Epoch: 1240/20000, Loss: 0.0004174785281066\n",
      "Epoch: 1250/20000, Loss: 0.0004093396710232\n",
      "Epoch: 1260/20000, Loss: 0.0004207298043184\n",
      "Epoch: 1270/20000, Loss: 0.0003956659056712\n",
      "Epoch: 1280/20000, Loss: 0.0003803483559750\n",
      "Epoch: 1290/20000, Loss: 0.0003709672018886\n",
      "Epoch: 1300/20000, Loss: 0.0003622767108027\n",
      "Epoch: 1310/20000, Loss: 0.0003533520502970\n",
      "Epoch: 1320/20000, Loss: 0.0003449192736298\n",
      "Epoch: 1330/20000, Loss: 0.0003366316086613\n",
      "Epoch: 1340/20000, Loss: 0.0003285844577476\n",
      "Epoch: 1350/20000, Loss: 0.0003207421686966\n",
      "Epoch: 1360/20000, Loss: 0.0003131013945676\n",
      "Epoch: 1370/20000, Loss: 0.0003056603891309\n",
      "Epoch: 1380/20000, Loss: 0.0002984215097968\n",
      "Epoch: 1390/20000, Loss: 0.0002914056822192\n",
      "Epoch: 1400/20000, Loss: 0.0002873030025512\n",
      "Epoch: 1410/20000, Loss: 0.0002965372113977\n",
      "Epoch: 1420/20000, Loss: 0.0002815067127813\n",
      "Epoch: 1430/20000, Loss: 0.0002665091888048\n",
      "Epoch: 1440/20000, Loss: 0.0002594339021016\n",
      "Epoch: 1450/20000, Loss: 0.0002538065891713\n",
      "Epoch: 1460/20000, Loss: 0.0002478375972714\n",
      "Epoch: 1470/20000, Loss: 0.0002422504912829\n",
      "Epoch: 1480/20000, Loss: 0.0002368823043071\n",
      "Epoch: 1490/20000, Loss: 0.0002317280304851\n",
      "Epoch: 1500/20000, Loss: 0.0002267428790219\n",
      "Epoch: 1510/20000, Loss: 0.0002219221933046\n",
      "Epoch: 1520/20000, Loss: 0.0002172645472456\n",
      "Epoch: 1530/20000, Loss: 0.0002127640618710\n",
      "Epoch: 1540/20000, Loss: 0.0002084255102091\n",
      "Epoch: 1550/20000, Loss: 0.0002057991368929\n",
      "Epoch: 1560/20000, Loss: 0.0002307845861651\n",
      "Epoch: 1570/20000, Loss: 0.0002019680541707\n",
      "Epoch: 1580/20000, Loss: 0.0001940994552569\n",
      "Epoch: 1590/20000, Loss: 0.0001897415204439\n",
      "Epoch: 1600/20000, Loss: 0.0001856790622696\n",
      "Epoch: 1610/20000, Loss: 0.0001820572651923\n",
      "Epoch: 1620/20000, Loss: 0.0001787108922144\n",
      "Epoch: 1630/20000, Loss: 0.0001755455305101\n",
      "Epoch: 1640/20000, Loss: 0.0001724785252009\n",
      "Epoch: 1650/20000, Loss: 0.0001695265673334\n",
      "Epoch: 1660/20000, Loss: 0.0001666823518462\n",
      "Epoch: 1670/20000, Loss: 0.0001639489782974\n",
      "Epoch: 1680/20000, Loss: 0.0001621907431399\n",
      "Epoch: 1690/20000, Loss: 0.0002255349245388\n",
      "Epoch: 1700/20000, Loss: 0.0001586392318131\n",
      "Epoch: 1710/20000, Loss: 0.0001554479676997\n",
      "Epoch: 1720/20000, Loss: 0.0001518622157164\n",
      "Epoch: 1730/20000, Loss: 0.0001495749747846\n",
      "Epoch: 1740/20000, Loss: 0.0001474219752708\n",
      "Epoch: 1750/20000, Loss: 0.0001453269651392\n",
      "Epoch: 1760/20000, Loss: 0.0001432833960280\n",
      "Epoch: 1770/20000, Loss: 0.0001413275458617\n",
      "Epoch: 1780/20000, Loss: 0.0001394691207679\n",
      "Epoch: 1790/20000, Loss: 0.0001376711152261\n",
      "Epoch: 1800/20000, Loss: 0.0001359367597615\n",
      "Epoch: 1810/20000, Loss: 0.0001342612085864\n",
      "Epoch: 1820/20000, Loss: 0.0001326429919573\n",
      "Epoch: 1830/20000, Loss: 0.0001310794614255\n",
      "Epoch: 1840/20000, Loss: 0.0001295704714721\n",
      "Epoch: 1850/20000, Loss: 0.0001282941811951\n",
      "Epoch: 1860/20000, Loss: 0.0001548503933009\n",
      "Epoch: 1870/20000, Loss: 0.0001400484470651\n",
      "Epoch: 1880/20000, Loss: 0.0001307749480475\n",
      "Epoch: 1890/20000, Loss: 0.0001246807078132\n",
      "Epoch: 1900/20000, Loss: 0.0001222642458742\n",
      "Epoch: 1910/20000, Loss: 0.0001205262014992\n",
      "Epoch: 1920/20000, Loss: 0.0001192350973724\n",
      "Epoch: 1930/20000, Loss: 0.0001180970575660\n",
      "Epoch: 1940/20000, Loss: 0.0001169953975477\n",
      "Epoch: 1950/20000, Loss: 0.0001159407038358\n",
      "Epoch: 1960/20000, Loss: 0.0001149193485617\n",
      "Epoch: 1970/20000, Loss: 0.0001139323721873\n",
      "Epoch: 1980/20000, Loss: 0.0001129754673457\n",
      "Epoch: 1990/20000, Loss: 0.0001120533052017\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 2000/20000, Loss: 0.0001114078986575\n",
      "Epoch: 2010/20000, Loss: 0.0001359580346616\n",
      "Epoch: 2020/20000, Loss: 0.0001294253306696\n",
      "Epoch: 2030/20000, Loss: 0.0001121178574977\n",
      "Epoch: 2040/20000, Loss: 0.0001106857089326\n",
      "Epoch: 2050/20000, Loss: 0.0001081952796085\n",
      "Epoch: 2060/20000, Loss: 0.0001064573225449\n",
      "Epoch: 2070/20000, Loss: 0.0001056891487679\n",
      "Epoch: 2080/20000, Loss: 0.0001048869162332\n",
      "Epoch: 2090/20000, Loss: 0.0001042025251081\n",
      "Epoch: 2100/20000, Loss: 0.0001035063978634\n",
      "Epoch: 2110/20000, Loss: 0.0001028442638926\n",
      "Epoch: 2120/20000, Loss: 0.0001022004362312\n",
      "Epoch: 2130/20000, Loss: 0.0001015739762806\n",
      "Epoch: 2140/20000, Loss: 0.0001009629122564\n",
      "Epoch: 2150/20000, Loss: 0.0001003666984616\n",
      "Epoch: 2160/20000, Loss: 0.0000997847382678\n",
      "Epoch: 2170/20000, Loss: 0.0000992163622868\n",
      "Epoch: 2180/20000, Loss: 0.0000986614832073\n",
      "Epoch: 2190/20000, Loss: 0.0000981455086730\n",
      "Epoch: 2200/20000, Loss: 0.0001012886859826\n",
      "Epoch: 2210/20000, Loss: 0.0001475926255807\n",
      "Epoch: 2220/20000, Loss: 0.0001105399860535\n",
      "Epoch: 2230/20000, Loss: 0.0000983268473647\n",
      "Epoch: 2240/20000, Loss: 0.0000959542594501\n",
      "Epoch: 2250/20000, Loss: 0.0000953814596869\n",
      "Epoch: 2260/20000, Loss: 0.0000948750239331\n",
      "Epoch: 2270/20000, Loss: 0.0000942996193771\n",
      "Epoch: 2280/20000, Loss: 0.0000938046068768\n",
      "Epoch: 2290/20000, Loss: 0.0000933353003347\n",
      "Epoch: 2300/20000, Loss: 0.0000928893132368\n",
      "Epoch: 2310/20000, Loss: 0.0000924580162973\n",
      "Epoch: 2320/20000, Loss: 0.0000920340389712\n",
      "Epoch: 2330/20000, Loss: 0.0000916161952773\n",
      "Epoch: 2340/20000, Loss: 0.0000912054820219\n",
      "Epoch: 2350/20000, Loss: 0.0000908007350517\n",
      "Epoch: 2360/20000, Loss: 0.0000904017724679\n",
      "Epoch: 2370/20000, Loss: 0.0000900082668522\n",
      "Epoch: 2380/20000, Loss: 0.0000896198471310\n",
      "Epoch: 2390/20000, Loss: 0.0000892362950253\n",
      "Epoch: 2400/20000, Loss: 0.0000888576541911\n",
      "Epoch: 2410/20000, Loss: 0.0000885082772584\n",
      "Epoch: 2420/20000, Loss: 0.0000940146055655\n",
      "Epoch: 2430/20000, Loss: 0.0001137301151175\n",
      "Epoch: 2440/20000, Loss: 0.0001011115818983\n",
      "Epoch: 2450/20000, Loss: 0.0000928199660848\n",
      "Epoch: 2460/20000, Loss: 0.0000869417708600\n",
      "Epoch: 2470/20000, Loss: 0.0000870428484632\n",
      "Epoch: 2480/20000, Loss: 0.0000862849046825\n",
      "Epoch: 2490/20000, Loss: 0.0000857038103277\n",
      "Epoch: 2500/20000, Loss: 0.0000853626552271\n",
      "Epoch: 2510/20000, Loss: 0.0000850091528264\n",
      "Epoch: 2520/20000, Loss: 0.0000846654729685\n",
      "Epoch: 2530/20000, Loss: 0.0000843247908051\n",
      "Epoch: 2540/20000, Loss: 0.0000839890417410\n",
      "Epoch: 2550/20000, Loss: 0.0000836561957840\n",
      "Epoch: 2560/20000, Loss: 0.0000833256635815\n",
      "Epoch: 2570/20000, Loss: 0.0000829970522318\n",
      "Epoch: 2580/20000, Loss: 0.0000826701361802\n",
      "Epoch: 2590/20000, Loss: 0.0000823447480798\n",
      "Epoch: 2600/20000, Loss: 0.0000820208515506\n",
      "Epoch: 2610/20000, Loss: 0.0000816983156255\n",
      "Epoch: 2620/20000, Loss: 0.0000813794904388\n",
      "Epoch: 2630/20000, Loss: 0.0000813433143776\n",
      "Epoch: 2640/20000, Loss: 0.0001298067945754\n",
      "Epoch: 2650/20000, Loss: 0.0001037944748532\n",
      "Epoch: 2660/20000, Loss: 0.0000866734917508\n",
      "Epoch: 2670/20000, Loss: 0.0000810567435110\n",
      "Epoch: 2680/20000, Loss: 0.0000798236360424\n",
      "Epoch: 2690/20000, Loss: 0.0000793418730609\n",
      "Epoch: 2700/20000, Loss: 0.0000789693804109\n",
      "Epoch: 2710/20000, Loss: 0.0000786252858234\n",
      "Epoch: 2720/20000, Loss: 0.0000782892529969\n",
      "Epoch: 2730/20000, Loss: 0.0000779671026976\n",
      "Epoch: 2740/20000, Loss: 0.0000776504239184\n",
      "Epoch: 2750/20000, Loss: 0.0000773387509980\n",
      "Epoch: 2760/20000, Loss: 0.0000770266851760\n",
      "Epoch: 2770/20000, Loss: 0.0000767158417148\n",
      "Epoch: 2780/20000, Loss: 0.0000764052674640\n",
      "Epoch: 2790/20000, Loss: 0.0000760949696996\n",
      "Epoch: 2800/20000, Loss: 0.0000757847956265\n",
      "Epoch: 2810/20000, Loss: 0.0000754747234168\n",
      "Epoch: 2820/20000, Loss: 0.0000751654879423\n",
      "Epoch: 2830/20000, Loss: 0.0000749885512050\n",
      "Epoch: 2840/20000, Loss: 0.0001103236718336\n",
      "Epoch: 2850/20000, Loss: 0.0001029444101732\n",
      "Epoch: 2860/20000, Loss: 0.0000809581833892\n",
      "Epoch: 2870/20000, Loss: 0.0000760589682613\n",
      "Epoch: 2880/20000, Loss: 0.0000745117213228\n",
      "Epoch: 2890/20000, Loss: 0.0000734590576030\n",
      "Epoch: 2900/20000, Loss: 0.0000729718376533\n",
      "Epoch: 2910/20000, Loss: 0.0000724796846043\n",
      "Epoch: 2920/20000, Loss: 0.0000721371106920\n",
      "Epoch: 2930/20000, Loss: 0.0000718177689123\n",
      "Epoch: 2940/20000, Loss: 0.0000715000496712\n",
      "Epoch: 2950/20000, Loss: 0.0000711856773705\n",
      "Epoch: 2960/20000, Loss: 0.0000708731531631\n",
      "Epoch: 2970/20000, Loss: 0.0000705610509613\n",
      "Epoch: 2980/20000, Loss: 0.0000702486140653\n",
      "Epoch: 2990/20000, Loss: 0.0000699361335137\n",
      "Epoch: 3000/20000, Loss: 0.0000696232818882\n",
      "Epoch: 3010/20000, Loss: 0.0000693105830578\n",
      "Epoch: 3020/20000, Loss: 0.0000690193046466\n",
      "Epoch: 3030/20000, Loss: 0.0000709979285602\n",
      "Epoch: 3040/20000, Loss: 0.0001493178133387\n",
      "Epoch: 3050/20000, Loss: 0.0000795400846982\n",
      "Epoch: 3060/20000, Loss: 0.0000718223745935\n",
      "Epoch: 3070/20000, Loss: 0.0000687294232193\n",
      "Epoch: 3080/20000, Loss: 0.0000678304131725\n",
      "Epoch: 3090/20000, Loss: 0.0000671467932989\n",
      "Epoch: 3100/20000, Loss: 0.0000665978514007\n",
      "Epoch: 3110/20000, Loss: 0.0000662329257466\n",
      "Epoch: 3120/20000, Loss: 0.0000659202341922\n",
      "Epoch: 3130/20000, Loss: 0.0000655932817608\n",
      "Epoch: 3140/20000, Loss: 0.0000652719463687\n",
      "Epoch: 3150/20000, Loss: 0.0000649538342259\n",
      "Epoch: 3160/20000, Loss: 0.0000646347980364\n",
      "Epoch: 3170/20000, Loss: 0.0000643158637104\n",
      "Epoch: 3180/20000, Loss: 0.0000639968056930\n",
      "Epoch: 3190/20000, Loss: 0.0000636778859189\n",
      "Epoch: 3200/20000, Loss: 0.0000634460229776\n",
      "Epoch: 3210/20000, Loss: 0.0000821685389383\n",
      "Epoch: 3220/20000, Loss: 0.0000709965024726\n",
      "Epoch: 3230/20000, Loss: 0.0000703719415469\n",
      "Epoch: 3240/20000, Loss: 0.0000647093620501\n",
      "Epoch: 3250/20000, Loss: 0.0000626925466349\n",
      "Epoch: 3260/20000, Loss: 0.0000627875051578\n",
      "Epoch: 3270/20000, Loss: 0.0000653719471302\n",
      "Epoch: 3280/20000, Loss: 0.0000748190286686\n",
      "Epoch: 3290/20000, Loss: 0.0000614513191977\n",
      "Epoch: 3300/20000, Loss: 0.0000606951762165\n",
      "Epoch: 3310/20000, Loss: 0.0000604730848863\n",
      "Epoch: 3320/20000, Loss: 0.0000599451741436\n",
      "Epoch: 3330/20000, Loss: 0.0000597672442382\n",
      "Epoch: 3340/20000, Loss: 0.0000619533821009\n",
      "Epoch: 3350/20000, Loss: 0.0000805193631095\n",
      "Epoch: 3360/20000, Loss: 0.0000738490198273\n",
      "Epoch: 3370/20000, Loss: 0.0000613873125985\n",
      "Epoch: 3380/20000, Loss: 0.0000577895079914\n",
      "Epoch: 3390/20000, Loss: 0.0000575411831960\n",
      "Epoch: 3400/20000, Loss: 0.0000571953823965\n",
      "Epoch: 3410/20000, Loss: 0.0000567336901440\n",
      "Epoch: 3420/20000, Loss: 0.0000563638495805\n",
      "Epoch: 3430/20000, Loss: 0.0000565088448639\n",
      "Epoch: 3440/20000, Loss: 0.0000846466209623\n",
      "Epoch: 3450/20000, Loss: 0.0000686944622430\n",
      "Epoch: 3460/20000, Loss: 0.0000576665552217\n",
      "Epoch: 3470/20000, Loss: 0.0000579896150157\n",
      "Epoch: 3480/20000, Loss: 0.0000551405973965\n",
      "Epoch: 3490/20000, Loss: 0.0000542632042198\n",
      "Epoch: 3500/20000, Loss: 0.0000539275497431\n",
      "Epoch: 3510/20000, Loss: 0.0000534861792403\n",
      "Epoch: 3520/20000, Loss: 0.0000531460755155\n",
      "Epoch: 3530/20000, Loss: 0.0000529722783540\n",
      "Epoch: 3540/20000, Loss: 0.0000583942310186\n",
      "Epoch: 3550/20000, Loss: 0.0000545029834029\n",
      "Epoch: 3560/20000, Loss: 0.0000534157989023\n",
      "Epoch: 3570/20000, Loss: 0.0000521409419889\n",
      "Epoch: 3580/20000, Loss: 0.0000514131606906\n",
      "Epoch: 3590/20000, Loss: 0.0000509504898218\n",
      "Epoch: 3600/20000, Loss: 0.0000508179509779\n",
      "Epoch: 3610/20000, Loss: 0.0000588328621234\n",
      "Epoch: 3620/20000, Loss: 0.0000567976567254\n",
      "Epoch: 3630/20000, Loss: 0.0000532052217750\n",
      "Epoch: 3640/20000, Loss: 0.0000511742182425\n",
      "Epoch: 3650/20000, Loss: 0.0000492837098136\n",
      "Epoch: 3660/20000, Loss: 0.0000489414742333\n",
      "Epoch: 3670/20000, Loss: 0.0000483869880554\n",
      "Epoch: 3680/20000, Loss: 0.0000480564522150\n",
      "Epoch: 3690/20000, Loss: 0.0000493248953717\n",
      "Epoch: 3700/20000, Loss: 0.0001095916595659\n",
      "Epoch: 3710/20000, Loss: 0.0000600286839472\n",
      "Epoch: 3720/20000, Loss: 0.0000515148421982\n",
      "Epoch: 3730/20000, Loss: 0.0000484991796839\n",
      "Epoch: 3740/20000, Loss: 0.0000461821982753\n",
      "Epoch: 3750/20000, Loss: 0.0000460839692096\n",
      "Epoch: 3760/20000, Loss: 0.0000455572189821\n",
      "Epoch: 3770/20000, Loss: 0.0000452371677966\n",
      "Epoch: 3780/20000, Loss: 0.0000449668841611\n",
      "Epoch: 3790/20000, Loss: 0.0000477539651911\n",
      "Epoch: 3800/20000, Loss: 0.0000455311565020\n",
      "Epoch: 3810/20000, Loss: 0.0000448973951279\n",
      "Epoch: 3820/20000, Loss: 0.0000442037417088\n",
      "Epoch: 3830/20000, Loss: 0.0000434166031482\n",
      "Epoch: 3840/20000, Loss: 0.0000430581130786\n",
      "Epoch: 3850/20000, Loss: 0.0000427402155765\n",
      "Epoch: 3860/20000, Loss: 0.0000439172581537\n",
      "Epoch: 3870/20000, Loss: 0.0001065919423127\n",
      "Epoch: 3880/20000, Loss: 0.0000508765187988\n",
      "Epoch: 3890/20000, Loss: 0.0000471400526294\n",
      "Epoch: 3900/20000, Loss: 0.0000431527696492\n",
      "Epoch: 3910/20000, Loss: 0.0000411437431467\n",
      "Epoch: 3920/20000, Loss: 0.0000408491578128\n",
      "Epoch: 3930/20000, Loss: 0.0000403832018492\n",
      "Epoch: 3940/20000, Loss: 0.0000400258795707\n",
      "Epoch: 3950/20000, Loss: 0.0000397111107304\n",
      "Epoch: 3960/20000, Loss: 0.0000394229537051\n",
      "Epoch: 3970/20000, Loss: 0.0000405608443543\n",
      "Epoch: 3980/20000, Loss: 0.0000745830620872\n",
      "Epoch: 3990/20000, Loss: 0.0000462324969703\n",
      "Epoch: 4000/20000, Loss: 0.0000402726327593\n",
      "Epoch: 4010/20000, Loss: 0.0000384937520721\n",
      "Epoch: 4020/20000, Loss: 0.0000379181947210\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 4030/20000, Loss: 0.0000375493182219\n",
      "Epoch: 4040/20000, Loss: 0.0000371440692106\n",
      "Epoch: 4050/20000, Loss: 0.0000368275759683\n",
      "Epoch: 4060/20000, Loss: 0.0000365244559362\n",
      "Epoch: 4070/20000, Loss: 0.0000362856626452\n",
      "Epoch: 4080/20000, Loss: 0.0000379512166546\n",
      "Epoch: 4090/20000, Loss: 0.0001105090632336\n",
      "Epoch: 4100/20000, Loss: 0.0000442946366093\n",
      "Epoch: 4110/20000, Loss: 0.0000403256890422\n",
      "Epoch: 4120/20000, Loss: 0.0000367415268556\n",
      "Epoch: 4130/20000, Loss: 0.0000353354698746\n",
      "Epoch: 4140/20000, Loss: 0.0000344050349668\n",
      "Epoch: 4150/20000, Loss: 0.0000341710874636\n",
      "Epoch: 4160/20000, Loss: 0.0000338109784934\n",
      "Epoch: 4170/20000, Loss: 0.0000335304539476\n",
      "Epoch: 4180/20000, Loss: 0.0000332530507876\n",
      "Epoch: 4190/20000, Loss: 0.0000329837712343\n",
      "Epoch: 4200/20000, Loss: 0.0000327223497152\n",
      "Epoch: 4210/20000, Loss: 0.0000328418063873\n",
      "Epoch: 4220/20000, Loss: 0.0000520341054653\n",
      "Epoch: 4230/20000, Loss: 0.0000363936887879\n",
      "Epoch: 4240/20000, Loss: 0.0000351832240995\n",
      "Epoch: 4250/20000, Loss: 0.0000327237648889\n",
      "Epoch: 4260/20000, Loss: 0.0000318930833600\n",
      "Epoch: 4270/20000, Loss: 0.0000324334978359\n",
      "Epoch: 4280/20000, Loss: 0.0000443286662630\n",
      "Epoch: 4290/20000, Loss: 0.0000326360859617\n",
      "Epoch: 4300/20000, Loss: 0.0000305621688312\n",
      "Epoch: 4310/20000, Loss: 0.0000304147233692\n",
      "Epoch: 4320/20000, Loss: 0.0000300972569676\n",
      "Epoch: 4330/20000, Loss: 0.0000308477610815\n",
      "Epoch: 4340/20000, Loss: 0.0000460246701550\n",
      "Epoch: 4350/20000, Loss: 0.0000305165794998\n",
      "Epoch: 4360/20000, Loss: 0.0000306893452944\n",
      "Epoch: 4370/20000, Loss: 0.0000297551141557\n",
      "Epoch: 4380/20000, Loss: 0.0000288584033115\n",
      "Epoch: 4390/20000, Loss: 0.0000282182609226\n",
      "Epoch: 4400/20000, Loss: 0.0000278861825791\n",
      "Epoch: 4410/20000, Loss: 0.0000286544091068\n",
      "Epoch: 4420/20000, Loss: 0.0000555288715987\n",
      "Epoch: 4430/20000, Loss: 0.0000364598054148\n",
      "Epoch: 4440/20000, Loss: 0.0000309520801238\n",
      "Epoch: 4450/20000, Loss: 0.0000275837373920\n",
      "Epoch: 4460/20000, Loss: 0.0000272089964710\n",
      "Epoch: 4470/20000, Loss: 0.0000263750935119\n",
      "Epoch: 4480/20000, Loss: 0.0000260590986727\n",
      "Epoch: 4490/20000, Loss: 0.0000258505879174\n",
      "Epoch: 4500/20000, Loss: 0.0000259597272816\n",
      "Epoch: 4510/20000, Loss: 0.0000434189714724\n",
      "Epoch: 4520/20000, Loss: 0.0000335774893756\n",
      "Epoch: 4530/20000, Loss: 0.0000296496473311\n",
      "Epoch: 4540/20000, Loss: 0.0000281351967715\n",
      "Epoch: 4550/20000, Loss: 0.0000249849435932\n",
      "Epoch: 4560/20000, Loss: 0.0000246460076596\n",
      "Epoch: 4570/20000, Loss: 0.0000242898458964\n",
      "Epoch: 4580/20000, Loss: 0.0000240633617068\n",
      "Epoch: 4590/20000, Loss: 0.0000238349384745\n",
      "Epoch: 4600/20000, Loss: 0.0000238251268456\n",
      "Epoch: 4610/20000, Loss: 0.0000293915381917\n",
      "Epoch: 4620/20000, Loss: 0.0000351657872670\n",
      "Epoch: 4630/20000, Loss: 0.0000244203420152\n",
      "Epoch: 4640/20000, Loss: 0.0000249184813583\n",
      "Epoch: 4650/20000, Loss: 0.0000232008169405\n",
      "Epoch: 4660/20000, Loss: 0.0000227562813961\n",
      "Epoch: 4670/20000, Loss: 0.0000236097348534\n",
      "Epoch: 4680/20000, Loss: 0.0000355827505700\n",
      "Epoch: 4690/20000, Loss: 0.0000233501141338\n",
      "Epoch: 4700/20000, Loss: 0.0000227733326028\n",
      "Epoch: 4710/20000, Loss: 0.0000219874982577\n",
      "Epoch: 4720/20000, Loss: 0.0000218807981582\n",
      "Epoch: 4730/20000, Loss: 0.0000214816100197\n",
      "Epoch: 4740/20000, Loss: 0.0000218465866055\n",
      "Epoch: 4750/20000, Loss: 0.0000289479157800\n",
      "Epoch: 4760/20000, Loss: 0.0000502093134855\n",
      "Epoch: 4770/20000, Loss: 0.0000291631222353\n",
      "Epoch: 4780/20000, Loss: 0.0000217164288188\n",
      "Epoch: 4790/20000, Loss: 0.0000216105672735\n",
      "Epoch: 4800/20000, Loss: 0.0000204266707442\n",
      "Epoch: 4810/20000, Loss: 0.0000201568491320\n",
      "Epoch: 4820/20000, Loss: 0.0000202540322789\n",
      "Epoch: 4830/20000, Loss: 0.0000268297462753\n",
      "Epoch: 4840/20000, Loss: 0.0000343621431966\n",
      "Epoch: 4850/20000, Loss: 0.0000213214552787\n",
      "Epoch: 4860/20000, Loss: 0.0000208797519008\n",
      "Epoch: 4870/20000, Loss: 0.0000199571059056\n",
      "Epoch: 4880/20000, Loss: 0.0000192205025087\n",
      "Epoch: 4890/20000, Loss: 0.0000189052843780\n",
      "Epoch: 4900/20000, Loss: 0.0000187599198398\n",
      "Epoch: 4910/20000, Loss: 0.0000189161801245\n",
      "Epoch: 4920/20000, Loss: 0.0000268504445557\n",
      "Epoch: 4930/20000, Loss: 0.0000320347862726\n",
      "Epoch: 4940/20000, Loss: 0.0000200352242246\n",
      "Epoch: 4950/20000, Loss: 0.0000192708612303\n",
      "Epoch: 4960/20000, Loss: 0.0000187405657925\n",
      "Epoch: 4970/20000, Loss: 0.0000180302140507\n",
      "Epoch: 4980/20000, Loss: 0.0000187340192497\n",
      "Epoch: 4990/20000, Loss: 0.0000356425771315\n",
      "Epoch: 5000/20000, Loss: 0.0000261273762590\n",
      "Epoch: 5010/20000, Loss: 0.0000194249550987\n",
      "Epoch: 5020/20000, Loss: 0.0000178475274879\n",
      "Epoch: 5030/20000, Loss: 0.0000173887619894\n",
      "Epoch: 5040/20000, Loss: 0.0000173366879608\n",
      "Epoch: 5050/20000, Loss: 0.0000191010840354\n",
      "Epoch: 5060/20000, Loss: 0.0000375386698579\n",
      "Epoch: 5070/20000, Loss: 0.0000216419211938\n",
      "Epoch: 5080/20000, Loss: 0.0000193083633349\n",
      "Epoch: 5090/20000, Loss: 0.0000175677250809\n",
      "Epoch: 5100/20000, Loss: 0.0000165573037521\n",
      "Epoch: 5110/20000, Loss: 0.0000162334381457\n",
      "Epoch: 5120/20000, Loss: 0.0000161065672728\n",
      "Epoch: 5130/20000, Loss: 0.0000201288421522\n",
      "Epoch: 5140/20000, Loss: 0.0000361633865396\n",
      "Epoch: 5150/20000, Loss: 0.0000214423253055\n",
      "Epoch: 5160/20000, Loss: 0.0000177595611603\n",
      "Epoch: 5170/20000, Loss: 0.0000165344263223\n",
      "Epoch: 5180/20000, Loss: 0.0000159393875947\n",
      "Epoch: 5190/20000, Loss: 0.0000193652995222\n",
      "Epoch: 5200/20000, Loss: 0.0000335700460710\n",
      "Epoch: 5210/20000, Loss: 0.0000199684291147\n",
      "Epoch: 5220/20000, Loss: 0.0000166351837834\n",
      "Epoch: 5230/20000, Loss: 0.0000151150616148\n",
      "Epoch: 5240/20000, Loss: 0.0000147774499055\n",
      "Epoch: 5250/20000, Loss: 0.0000149603120008\n",
      "Epoch: 5260/20000, Loss: 0.0000177140409505\n",
      "Epoch: 5270/20000, Loss: 0.0000366919484804\n",
      "Epoch: 5280/20000, Loss: 0.0000180748938874\n",
      "Epoch: 5290/20000, Loss: 0.0000151959984578\n",
      "Epoch: 5300/20000, Loss: 0.0000149035913637\n",
      "Epoch: 5310/20000, Loss: 0.0000144472296597\n",
      "Epoch: 5320/20000, Loss: 0.0000145661533679\n",
      "Epoch: 5330/20000, Loss: 0.0000286817230517\n",
      "Epoch: 5340/20000, Loss: 0.0000230874302360\n",
      "Epoch: 5350/20000, Loss: 0.0000177806887223\n",
      "Epoch: 5360/20000, Loss: 0.0000148755716509\n",
      "Epoch: 5370/20000, Loss: 0.0000138984023579\n",
      "Epoch: 5380/20000, Loss: 0.0000136856006065\n",
      "Epoch: 5390/20000, Loss: 0.0000135579684866\n",
      "Epoch: 5400/20000, Loss: 0.0000134304573294\n",
      "Epoch: 5410/20000, Loss: 0.0000133915227707\n",
      "Epoch: 5420/20000, Loss: 0.0000156348287419\n",
      "Epoch: 5430/20000, Loss: 0.0000460422670585\n",
      "Epoch: 5440/20000, Loss: 0.0000176193552761\n",
      "Epoch: 5450/20000, Loss: 0.0000178865157068\n",
      "Epoch: 5460/20000, Loss: 0.0000137411179821\n",
      "Epoch: 5470/20000, Loss: 0.0000131800397867\n",
      "Epoch: 5480/20000, Loss: 0.0000130293692564\n",
      "Epoch: 5490/20000, Loss: 0.0000129696736622\n",
      "Epoch: 5500/20000, Loss: 0.0000147151340570\n",
      "Epoch: 5510/20000, Loss: 0.0000459321381641\n",
      "Epoch: 5520/20000, Loss: 0.0000247800217039\n",
      "Epoch: 5530/20000, Loss: 0.0000129653808472\n",
      "Epoch: 5540/20000, Loss: 0.0000139757949000\n",
      "Epoch: 5550/20000, Loss: 0.0000125976866912\n",
      "Epoch: 5560/20000, Loss: 0.0000126055083456\n",
      "Epoch: 5570/20000, Loss: 0.0000159528281074\n",
      "Epoch: 5580/20000, Loss: 0.0000361046222679\n",
      "Epoch: 5590/20000, Loss: 0.0000168048591149\n",
      "Epoch: 5600/20000, Loss: 0.0000121947705338\n",
      "Epoch: 5610/20000, Loss: 0.0000123154622997\n",
      "Epoch: 5620/20000, Loss: 0.0000121926186694\n",
      "Epoch: 5630/20000, Loss: 0.0000121591756397\n",
      "Epoch: 5640/20000, Loss: 0.0000162776905199\n",
      "Epoch: 5650/20000, Loss: 0.0000231053345487\n",
      "Epoch: 5660/20000, Loss: 0.0000125318738355\n",
      "Epoch: 5670/20000, Loss: 0.0000126576433104\n",
      "Epoch: 5680/20000, Loss: 0.0000121142011267\n",
      "Epoch: 5690/20000, Loss: 0.0000117605768537\n",
      "Epoch: 5700/20000, Loss: 0.0000119313708637\n",
      "Epoch: 5710/20000, Loss: 0.0000193667183339\n",
      "Epoch: 5720/20000, Loss: 0.0000190400678548\n",
      "Epoch: 5730/20000, Loss: 0.0000157565918926\n",
      "Epoch: 5740/20000, Loss: 0.0000141262253237\n",
      "Epoch: 5750/20000, Loss: 0.0000118231691886\n",
      "Epoch: 5760/20000, Loss: 0.0000112772595457\n",
      "Epoch: 5770/20000, Loss: 0.0000115491975521\n",
      "Epoch: 5780/20000, Loss: 0.0000155977286340\n",
      "Epoch: 5790/20000, Loss: 0.0000379129560315\n",
      "Epoch: 5800/20000, Loss: 0.0000179272865353\n",
      "Epoch: 5810/20000, Loss: 0.0000122665260278\n",
      "Epoch: 5820/20000, Loss: 0.0000110627406684\n",
      "Epoch: 5830/20000, Loss: 0.0000109552747745\n",
      "Epoch: 5840/20000, Loss: 0.0000109926950245\n",
      "Epoch: 5850/20000, Loss: 0.0000127658740894\n",
      "Epoch: 5860/20000, Loss: 0.0000333537500410\n",
      "Epoch: 5870/20000, Loss: 0.0000183439788088\n",
      "Epoch: 5880/20000, Loss: 0.0000117619156299\n",
      "Epoch: 5890/20000, Loss: 0.0000113708792924\n",
      "Epoch: 5900/20000, Loss: 0.0000108944477688\n",
      "Epoch: 5910/20000, Loss: 0.0000108460835690\n",
      "Epoch: 5920/20000, Loss: 0.0000126584154714\n",
      "Epoch: 5930/20000, Loss: 0.0000471324237878\n",
      "Epoch: 5940/20000, Loss: 0.0000211874630622\n",
      "Epoch: 5950/20000, Loss: 0.0000107861087599\n",
      "Epoch: 5960/20000, Loss: 0.0000116073169920\n",
      "Epoch: 5970/20000, Loss: 0.0000107543355625\n",
      "Epoch: 5980/20000, Loss: 0.0000103957090687\n",
      "Epoch: 5990/20000, Loss: 0.0000105575873022\n",
      "Epoch: 6000/20000, Loss: 0.0000173392327270\n",
      "Epoch: 6010/20000, Loss: 0.0000126001714307\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 6020/20000, Loss: 0.0000115666598504\n",
      "Epoch: 6030/20000, Loss: 0.0000117495483209\n",
      "Epoch: 6040/20000, Loss: 0.0000129637819555\n",
      "Epoch: 6050/20000, Loss: 0.0000190552491404\n",
      "Epoch: 6060/20000, Loss: 0.0000119850174087\n",
      "Epoch: 6070/20000, Loss: 0.0000118143316286\n",
      "Epoch: 6080/20000, Loss: 0.0000103578822745\n",
      "Epoch: 6090/20000, Loss: 0.0000104063356048\n",
      "Epoch: 6100/20000, Loss: 0.0000103760712591\n",
      "Epoch: 6110/20000, Loss: 0.0000140462570926\n",
      "Epoch: 6120/20000, Loss: 0.0000461401723442\n",
      "Epoch: 6130/20000, Loss: 0.0000171123992914\n",
      "Epoch: 6140/20000, Loss: 0.0000126990435092\n",
      "Epoch: 6150/20000, Loss: 0.0000104738892333\n",
      "Epoch: 6160/20000, Loss: 0.0000101588429970\n",
      "Epoch: 6170/20000, Loss: 0.0000100820670923\n",
      "Epoch: 6180/20000, Loss: 0.0000113838659672\n",
      "Epoch: 6190/20000, Loss: 0.0000229598244914\n",
      "Epoch: 6200/20000, Loss: 0.0000119501282825\n",
      "Epoch: 6210/20000, Loss: 0.0000101143405118\n",
      "Epoch: 6220/20000, Loss: 0.0000097457223092\n",
      "Epoch: 6230/20000, Loss: 0.0000098457885542\n",
      "Epoch: 6240/20000, Loss: 0.0000099334847619\n",
      "Epoch: 6250/20000, Loss: 0.0000168346414284\n",
      "Epoch: 6260/20000, Loss: 0.0000134765732582\n",
      "Epoch: 6270/20000, Loss: 0.0000170701114257\n",
      "Epoch: 6280/20000, Loss: 0.0000111385206765\n",
      "Epoch: 6290/20000, Loss: 0.0000098632926893\n",
      "Epoch: 6300/20000, Loss: 0.0000101003506643\n",
      "Epoch: 6310/20000, Loss: 0.0000120699505715\n",
      "Epoch: 6320/20000, Loss: 0.0000352557472070\n",
      "Epoch: 6330/20000, Loss: 0.0000166830250237\n",
      "Epoch: 6340/20000, Loss: 0.0000115265538625\n",
      "Epoch: 6350/20000, Loss: 0.0000100522920548\n",
      "Epoch: 6360/20000, Loss: 0.0000099178259916\n",
      "Epoch: 6370/20000, Loss: 0.0000136881899380\n",
      "Epoch: 6380/20000, Loss: 0.0000238444772549\n",
      "Epoch: 6390/20000, Loss: 0.0000127688836074\n",
      "Epoch: 6400/20000, Loss: 0.0000106205643533\n",
      "Epoch: 6410/20000, Loss: 0.0000099454891824\n",
      "Epoch: 6420/20000, Loss: 0.0000094240867838\n",
      "Epoch: 6430/20000, Loss: 0.0000092683731054\n",
      "Epoch: 6440/20000, Loss: 0.0000092438422143\n",
      "Epoch: 6450/20000, Loss: 0.0000117673225759\n",
      "Epoch: 6460/20000, Loss: 0.0000387074287573\n",
      "Epoch: 6470/20000, Loss: 0.0000156126152433\n",
      "Epoch: 6480/20000, Loss: 0.0000136154176289\n",
      "Epoch: 6490/20000, Loss: 0.0000105176732177\n",
      "Epoch: 6500/20000, Loss: 0.0000092660393420\n",
      "Epoch: 6510/20000, Loss: 0.0000091446563601\n",
      "Epoch: 6520/20000, Loss: 0.0000090228122644\n",
      "Epoch: 6530/20000, Loss: 0.0000091082711151\n",
      "Epoch: 6540/20000, Loss: 0.0000137488295877\n",
      "Epoch: 6550/20000, Loss: 0.0000200131635211\n",
      "Epoch: 6560/20000, Loss: 0.0000113292280730\n",
      "Epoch: 6570/20000, Loss: 0.0000106462111944\n",
      "Epoch: 6580/20000, Loss: 0.0000092689333542\n",
      "Epoch: 6590/20000, Loss: 0.0000091595775302\n",
      "Epoch: 6600/20000, Loss: 0.0000092584004960\n",
      "Epoch: 6610/20000, Loss: 0.0000152325474119\n",
      "Epoch: 6620/20000, Loss: 0.0000193153864529\n",
      "Epoch: 6630/20000, Loss: 0.0000108885897134\n",
      "Epoch: 6640/20000, Loss: 0.0000091031251941\n",
      "Epoch: 6650/20000, Loss: 0.0000090276125775\n",
      "Epoch: 6660/20000, Loss: 0.0000093563703558\n",
      "Epoch: 6670/20000, Loss: 0.0000198076049855\n",
      "Epoch: 6680/20000, Loss: 0.0000136973276312\n",
      "Epoch: 6690/20000, Loss: 0.0000111525250759\n",
      "Epoch: 6700/20000, Loss: 0.0000103468673842\n",
      "Epoch: 6710/20000, Loss: 0.0000092829559435\n",
      "Epoch: 6720/20000, Loss: 0.0000088178694568\n",
      "Epoch: 6730/20000, Loss: 0.0000087657153927\n",
      "Epoch: 6740/20000, Loss: 0.0000088550195869\n",
      "Epoch: 6750/20000, Loss: 0.0000117598001452\n",
      "Epoch: 6760/20000, Loss: 0.0000270120617643\n",
      "Epoch: 6770/20000, Loss: 0.0000168051046785\n",
      "Epoch: 6780/20000, Loss: 0.0000126659469970\n",
      "Epoch: 6790/20000, Loss: 0.0000098695772976\n",
      "Epoch: 6800/20000, Loss: 0.0000093754697446\n",
      "Epoch: 6810/20000, Loss: 0.0000098137361420\n",
      "Epoch: 6820/20000, Loss: 0.0000152705979417\n",
      "Epoch: 6830/20000, Loss: 0.0000160441941262\n",
      "Epoch: 6840/20000, Loss: 0.0000125980332086\n",
      "Epoch: 6850/20000, Loss: 0.0000101064861155\n",
      "Epoch: 6860/20000, Loss: 0.0000092910695457\n",
      "Epoch: 6870/20000, Loss: 0.0000088089000201\n",
      "Epoch: 6880/20000, Loss: 0.0000087558764790\n",
      "Epoch: 6890/20000, Loss: 0.0000098784057627\n",
      "Epoch: 6900/20000, Loss: 0.0000231925969274\n",
      "Epoch: 6910/20000, Loss: 0.0000335898184858\n",
      "Epoch: 6920/20000, Loss: 0.0000151327731146\n",
      "Epoch: 6930/20000, Loss: 0.0000099753442555\n",
      "Epoch: 6940/20000, Loss: 0.0000093180997283\n",
      "Epoch: 6950/20000, Loss: 0.0000085634428615\n",
      "Epoch: 6960/20000, Loss: 0.0000085219235189\n",
      "Epoch: 6970/20000, Loss: 0.0000097121164799\n",
      "Epoch: 6980/20000, Loss: 0.0000368307883036\n",
      "Epoch: 6990/20000, Loss: 0.0000193924679479\n",
      "Epoch: 7000/20000, Loss: 0.0000091706542662\n",
      "Epoch: 7010/20000, Loss: 0.0000094095912573\n",
      "Epoch: 7020/20000, Loss: 0.0000091062865977\n",
      "Epoch: 7030/20000, Loss: 0.0000097012498372\n",
      "Epoch: 7040/20000, Loss: 0.0000114091380965\n",
      "Epoch: 7050/20000, Loss: 0.0000111182080218\n",
      "Epoch: 7060/20000, Loss: 0.0000327767083945\n",
      "Epoch: 7070/20000, Loss: 0.0000151396134243\n",
      "Epoch: 7080/20000, Loss: 0.0000111151348392\n",
      "Epoch: 7090/20000, Loss: 0.0000086081172412\n",
      "Epoch: 7100/20000, Loss: 0.0000083821532826\n",
      "Epoch: 7110/20000, Loss: 0.0000084464445536\n",
      "Epoch: 7120/20000, Loss: 0.0000101681607703\n",
      "Epoch: 7130/20000, Loss: 0.0000306581096083\n",
      "Epoch: 7140/20000, Loss: 0.0000141853797686\n",
      "Epoch: 7150/20000, Loss: 0.0000102730864455\n",
      "Epoch: 7160/20000, Loss: 0.0000084620141934\n",
      "Epoch: 7170/20000, Loss: 0.0000082501201177\n",
      "Epoch: 7180/20000, Loss: 0.0000082229553300\n",
      "Epoch: 7190/20000, Loss: 0.0000083020931925\n",
      "Epoch: 7200/20000, Loss: 0.0000136659809868\n",
      "Epoch: 7210/20000, Loss: 0.0000205971427931\n",
      "Epoch: 7220/20000, Loss: 0.0000145682770381\n",
      "Epoch: 7230/20000, Loss: 0.0000088205060820\n",
      "Epoch: 7240/20000, Loss: 0.0000088103706730\n",
      "Epoch: 7250/20000, Loss: 0.0000091869305834\n",
      "Epoch: 7260/20000, Loss: 0.0000197079189093\n",
      "Epoch: 7270/20000, Loss: 0.0000131957813210\n",
      "Epoch: 7280/20000, Loss: 0.0000091658030215\n",
      "Epoch: 7290/20000, Loss: 0.0000092568307082\n",
      "Epoch: 7300/20000, Loss: 0.0000087191292550\n",
      "Epoch: 7310/20000, Loss: 0.0000083135846580\n",
      "Epoch: 7320/20000, Loss: 0.0000082205087892\n",
      "Epoch: 7330/20000, Loss: 0.0000090217654360\n",
      "Epoch: 7340/20000, Loss: 0.0000281291577267\n",
      "Epoch: 7350/20000, Loss: 0.0000125360202219\n",
      "Epoch: 7360/20000, Loss: 0.0000107923115138\n",
      "Epoch: 7370/20000, Loss: 0.0000088391070676\n",
      "Epoch: 7380/20000, Loss: 0.0000082550895968\n",
      "Epoch: 7390/20000, Loss: 0.0000081283669715\n",
      "Epoch: 7400/20000, Loss: 0.0000091803185569\n",
      "Epoch: 7410/20000, Loss: 0.0000408236155636\n",
      "Epoch: 7420/20000, Loss: 0.0000196311557374\n",
      "Epoch: 7430/20000, Loss: 0.0000092545596999\n",
      "Epoch: 7440/20000, Loss: 0.0000094059059847\n",
      "Epoch: 7450/20000, Loss: 0.0000081715861597\n",
      "Epoch: 7460/20000, Loss: 0.0000080557210822\n",
      "Epoch: 7470/20000, Loss: 0.0000083283030108\n",
      "Epoch: 7480/20000, Loss: 0.0000189109850908\n",
      "Epoch: 7490/20000, Loss: 0.0000159596656886\n",
      "Epoch: 7500/20000, Loss: 0.0000103081592897\n",
      "Epoch: 7510/20000, Loss: 0.0000089316554295\n",
      "Epoch: 7520/20000, Loss: 0.0000085364508777\n",
      "Epoch: 7530/20000, Loss: 0.0000081685502664\n",
      "Epoch: 7540/20000, Loss: 0.0000083416944108\n",
      "Epoch: 7550/20000, Loss: 0.0000137143142638\n",
      "Epoch: 7560/20000, Loss: 0.0000173759690369\n",
      "Epoch: 7570/20000, Loss: 0.0000102088342828\n",
      "Epoch: 7580/20000, Loss: 0.0000084982302724\n",
      "Epoch: 7590/20000, Loss: 0.0000080174404502\n",
      "Epoch: 7600/20000, Loss: 0.0000080151785369\n",
      "Epoch: 7610/20000, Loss: 0.0000078790644693\n",
      "Epoch: 7620/20000, Loss: 0.0000081540492829\n",
      "Epoch: 7630/20000, Loss: 0.0000177795554919\n",
      "Epoch: 7640/20000, Loss: 0.0000134823812914\n",
      "Epoch: 7650/20000, Loss: 0.0000117649233289\n",
      "Epoch: 7660/20000, Loss: 0.0000094919951152\n",
      "Epoch: 7670/20000, Loss: 0.0000102165085991\n",
      "Epoch: 7680/20000, Loss: 0.0000279438263533\n",
      "Epoch: 7690/20000, Loss: 0.0000131390579554\n",
      "Epoch: 7700/20000, Loss: 0.0000096378735179\n",
      "Epoch: 7710/20000, Loss: 0.0000084161119958\n",
      "Epoch: 7720/20000, Loss: 0.0000079787187133\n",
      "Epoch: 7730/20000, Loss: 0.0000079006977103\n",
      "Epoch: 7740/20000, Loss: 0.0000091055744633\n",
      "Epoch: 7750/20000, Loss: 0.0000279059822788\n",
      "Epoch: 7760/20000, Loss: 0.0000145364792843\n",
      "Epoch: 7770/20000, Loss: 0.0000095717650765\n",
      "Epoch: 7780/20000, Loss: 0.0000082725873654\n",
      "Epoch: 7790/20000, Loss: 0.0000081694261098\n",
      "Epoch: 7800/20000, Loss: 0.0000097231140899\n",
      "Epoch: 7810/20000, Loss: 0.0000300158571918\n",
      "Epoch: 7820/20000, Loss: 0.0000140315414683\n",
      "Epoch: 7830/20000, Loss: 0.0000097713354990\n",
      "Epoch: 7840/20000, Loss: 0.0000082135375123\n",
      "Epoch: 7850/20000, Loss: 0.0000078812354332\n",
      "Epoch: 7860/20000, Loss: 0.0000084515377239\n",
      "Epoch: 7870/20000, Loss: 0.0000683545295033\n",
      "Epoch: 7880/20000, Loss: 0.0000148279023051\n",
      "Epoch: 7890/20000, Loss: 0.0000104420732896\n",
      "Epoch: 7900/20000, Loss: 0.0000090024659585\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 7910/20000, Loss: 0.0000083855411503\n",
      "Epoch: 7920/20000, Loss: 0.0000079725577962\n",
      "Epoch: 7930/20000, Loss: 0.0000077614740803\n",
      "Epoch: 7940/20000, Loss: 0.0000076719852586\n",
      "Epoch: 7950/20000, Loss: 0.0000076543037721\n",
      "Epoch: 7960/20000, Loss: 0.0000076399364843\n",
      "Epoch: 7970/20000, Loss: 0.0000076360283856\n",
      "Epoch: 7980/20000, Loss: 0.0000079402861957\n",
      "Epoch: 7990/20000, Loss: 0.0000239312503254\n",
      "Epoch: 8000/20000, Loss: 0.0000170725670614\n",
      "Epoch: 8010/20000, Loss: 0.0000090045805337\n",
      "Epoch: 8020/20000, Loss: 0.0000089446884886\n",
      "Epoch: 8030/20000, Loss: 0.0000081246198533\n",
      "Epoch: 8040/20000, Loss: 0.0000076626947703\n",
      "Epoch: 8050/20000, Loss: 0.0000078945140558\n",
      "Epoch: 8060/20000, Loss: 0.0000149529514601\n",
      "Epoch: 8070/20000, Loss: 0.0000115262128020\n",
      "Epoch: 8080/20000, Loss: 0.0000089742188720\n",
      "Epoch: 8090/20000, Loss: 0.0000086486279542\n",
      "Epoch: 8100/20000, Loss: 0.0000080363133748\n",
      "Epoch: 8110/20000, Loss: 0.0000077200793385\n",
      "Epoch: 8120/20000, Loss: 0.0000077953427535\n",
      "Epoch: 8130/20000, Loss: 0.0000176927696884\n",
      "Epoch: 8140/20000, Loss: 0.0000096730000223\n",
      "Epoch: 8150/20000, Loss: 0.0000110916498670\n",
      "Epoch: 8160/20000, Loss: 0.0000084849816631\n",
      "Epoch: 8170/20000, Loss: 0.0000077038002928\n",
      "Epoch: 8180/20000, Loss: 0.0000076814440035\n",
      "Epoch: 8190/20000, Loss: 0.0000075204443419\n",
      "Epoch: 8200/20000, Loss: 0.0000075724688031\n",
      "Epoch: 8210/20000, Loss: 0.0000145539079313\n",
      "Epoch: 8220/20000, Loss: 0.0000150582964125\n",
      "Epoch: 8230/20000, Loss: 0.0000142354383570\n",
      "Epoch: 8240/20000, Loss: 0.0000099829512692\n",
      "Epoch: 8250/20000, Loss: 0.0000084326566139\n",
      "Epoch: 8260/20000, Loss: 0.0000075760285654\n",
      "Epoch: 8270/20000, Loss: 0.0000076003525464\n",
      "Epoch: 8280/20000, Loss: 0.0000076921869550\n",
      "Epoch: 8290/20000, Loss: 0.0000099594844869\n",
      "Epoch: 8300/20000, Loss: 0.0000180676652235\n",
      "Epoch: 8310/20000, Loss: 0.0000109920320028\n",
      "Epoch: 8320/20000, Loss: 0.0000218646273424\n",
      "Epoch: 8330/20000, Loss: 0.0000112411898954\n",
      "Epoch: 8340/20000, Loss: 0.0000090483599706\n",
      "Epoch: 8350/20000, Loss: 0.0000079419514805\n",
      "Epoch: 8360/20000, Loss: 0.0000074369763752\n",
      "Epoch: 8370/20000, Loss: 0.0000074508443504\n",
      "Epoch: 8380/20000, Loss: 0.0000087732314569\n",
      "Epoch: 8390/20000, Loss: 0.0000282842611341\n",
      "Epoch: 8400/20000, Loss: 0.0000117628196676\n",
      "Epoch: 8410/20000, Loss: 0.0000098514219644\n",
      "Epoch: 8420/20000, Loss: 0.0000170283674379\n",
      "Epoch: 8430/20000, Loss: 0.0000101003661257\n",
      "Epoch: 8440/20000, Loss: 0.0000080511254055\n",
      "Epoch: 8450/20000, Loss: 0.0000077916774899\n",
      "Epoch: 8460/20000, Loss: 0.0000078340081018\n",
      "Epoch: 8470/20000, Loss: 0.0000123906174849\n",
      "Epoch: 8480/20000, Loss: 0.0000168950082298\n",
      "Epoch: 8490/20000, Loss: 0.0000099648314063\n",
      "Epoch: 8500/20000, Loss: 0.0000082427677626\n",
      "Epoch: 8510/20000, Loss: 0.0000074723229773\n",
      "Epoch: 8520/20000, Loss: 0.0000073306041486\n",
      "Epoch: 8530/20000, Loss: 0.0000075268562796\n",
      "Epoch: 8540/20000, Loss: 0.0000119275237012\n",
      "Epoch: 8550/20000, Loss: 0.0000258648487943\n",
      "Epoch: 8560/20000, Loss: 0.0000097905167422\n",
      "Epoch: 8570/20000, Loss: 0.0000080891977632\n",
      "Epoch: 8580/20000, Loss: 0.0000079126330093\n",
      "Epoch: 8590/20000, Loss: 0.0000075073426160\n",
      "Epoch: 8600/20000, Loss: 0.0000074802296695\n",
      "Epoch: 8610/20000, Loss: 0.0000128200063045\n",
      "Epoch: 8620/20000, Loss: 0.0000182185813173\n",
      "Epoch: 8630/20000, Loss: 0.0000091248284662\n",
      "Epoch: 8640/20000, Loss: 0.0000093072012533\n",
      "Epoch: 8650/20000, Loss: 0.0000084177800090\n",
      "Epoch: 8660/20000, Loss: 0.0000128973251776\n",
      "Epoch: 8670/20000, Loss: 0.0000116571800390\n",
      "Epoch: 8680/20000, Loss: 0.0000086613417807\n",
      "Epoch: 8690/20000, Loss: 0.0000080299823821\n",
      "Epoch: 8700/20000, Loss: 0.0000089142158686\n",
      "Epoch: 8710/20000, Loss: 0.0000112305224320\n",
      "Epoch: 8720/20000, Loss: 0.0000091173960755\n",
      "Epoch: 8730/20000, Loss: 0.0000113079895527\n",
      "Epoch: 8740/20000, Loss: 0.0000130685220938\n",
      "Epoch: 8750/20000, Loss: 0.0000090035746325\n",
      "Epoch: 8760/20000, Loss: 0.0000088253382273\n",
      "Epoch: 8770/20000, Loss: 0.0000191078925127\n",
      "Epoch: 8780/20000, Loss: 0.0000087815978986\n",
      "Epoch: 8790/20000, Loss: 0.0000073123337643\n",
      "Epoch: 8800/20000, Loss: 0.0000071741892498\n",
      "Epoch: 8810/20000, Loss: 0.0000072823090704\n",
      "Epoch: 8820/20000, Loss: 0.0000082871029008\n",
      "Epoch: 8830/20000, Loss: 0.0000203154340852\n",
      "Epoch: 8840/20000, Loss: 0.0000111835279313\n",
      "Epoch: 8850/20000, Loss: 0.0000127734365378\n",
      "Epoch: 8860/20000, Loss: 0.0000117593017421\n",
      "Epoch: 8870/20000, Loss: 0.0000081030129877\n",
      "Epoch: 8880/20000, Loss: 0.0000081444113675\n",
      "Epoch: 8890/20000, Loss: 0.0000160326890182\n",
      "Epoch: 8900/20000, Loss: 0.0000093027556431\n",
      "Epoch: 8910/20000, Loss: 0.0000099696226243\n",
      "Epoch: 8920/20000, Loss: 0.0000098945511127\n",
      "Epoch: 8930/20000, Loss: 0.0000096949879662\n",
      "Epoch: 8940/20000, Loss: 0.0000106196093839\n",
      "Epoch: 8950/20000, Loss: 0.0000089095365183\n",
      "Epoch: 8960/20000, Loss: 0.0000080626141425\n",
      "Epoch: 8970/20000, Loss: 0.0000112527241072\n",
      "Epoch: 8980/20000, Loss: 0.0000142263588714\n",
      "Epoch: 8990/20000, Loss: 0.0000089897212092\n",
      "Epoch: 9000/20000, Loss: 0.0000077945469457\n",
      "Epoch: 9010/20000, Loss: 0.0000093724020189\n",
      "Epoch: 9020/20000, Loss: 0.0000183420161193\n",
      "Epoch: 9030/20000, Loss: 0.0000238271422859\n",
      "Epoch: 9040/20000, Loss: 0.0000110872824735\n",
      "Epoch: 9050/20000, Loss: 0.0000071845724960\n",
      "Epoch: 9060/20000, Loss: 0.0000075831480899\n",
      "Epoch: 9070/20000, Loss: 0.0000094705519587\n",
      "Epoch: 9080/20000, Loss: 0.0000128860619952\n",
      "Epoch: 9090/20000, Loss: 0.0000082511105575\n",
      "Epoch: 9100/20000, Loss: 0.0000071003119047\n",
      "Epoch: 9110/20000, Loss: 0.0000081703237811\n",
      "Epoch: 9120/20000, Loss: 0.0000222286598728\n",
      "Epoch: 9130/20000, Loss: 0.0000155353700393\n",
      "Epoch: 9140/20000, Loss: 0.0000084006978796\n",
      "Epoch: 9150/20000, Loss: 0.0000071697663770\n",
      "Epoch: 9160/20000, Loss: 0.0000070928526839\n",
      "Epoch: 9170/20000, Loss: 0.0000068858962550\n",
      "Epoch: 9180/20000, Loss: 0.0000072300190368\n",
      "Epoch: 9190/20000, Loss: 0.0000234212911892\n",
      "Epoch: 9200/20000, Loss: 0.0000153961373144\n",
      "Epoch: 9210/20000, Loss: 0.0000108250496851\n",
      "Epoch: 9220/20000, Loss: 0.0000069719899329\n",
      "Epoch: 9230/20000, Loss: 0.0000072857956184\n",
      "Epoch: 9240/20000, Loss: 0.0000067482660597\n",
      "Epoch: 9250/20000, Loss: 0.0000068915505835\n",
      "Epoch: 9260/20000, Loss: 0.0000124014031826\n",
      "Epoch: 9270/20000, Loss: 0.0000149446414071\n",
      "Epoch: 9280/20000, Loss: 0.0000106541137939\n",
      "Epoch: 9290/20000, Loss: 0.0000088501474238\n",
      "Epoch: 9300/20000, Loss: 0.0000073857013376\n",
      "Epoch: 9310/20000, Loss: 0.0000066504744609\n",
      "Epoch: 9320/20000, Loss: 0.0000067110295277\n",
      "Epoch: 9330/20000, Loss: 0.0000069725460889\n",
      "Epoch: 9340/20000, Loss: 0.0000115735147119\n",
      "Epoch: 9350/20000, Loss: 0.0000176074481715\n",
      "Epoch: 9360/20000, Loss: 0.0000094535853350\n",
      "Epoch: 9370/20000, Loss: 0.0000069908874138\n",
      "Epoch: 9380/20000, Loss: 0.0000066391394284\n",
      "Epoch: 9390/20000, Loss: 0.0000066150582825\n",
      "Epoch: 9400/20000, Loss: 0.0000071287458923\n",
      "Epoch: 9410/20000, Loss: 0.0000180950210051\n",
      "Epoch: 9420/20000, Loss: 0.0000132889772431\n",
      "Epoch: 9430/20000, Loss: 0.0000125719643620\n",
      "Epoch: 9440/20000, Loss: 0.0000073812971095\n",
      "Epoch: 9450/20000, Loss: 0.0000067530795604\n",
      "Epoch: 9460/20000, Loss: 0.0000066574225457\n",
      "Epoch: 9470/20000, Loss: 0.0000067324276642\n",
      "Epoch: 9480/20000, Loss: 0.0000107780460894\n",
      "Epoch: 9490/20000, Loss: 0.0000161472671607\n",
      "Epoch: 9500/20000, Loss: 0.0000094250217444\n",
      "Epoch: 9510/20000, Loss: 0.0000179830985871\n",
      "Epoch: 9520/20000, Loss: 0.0000094498454928\n",
      "Epoch: 9530/20000, Loss: 0.0000076970381997\n",
      "Epoch: 9540/20000, Loss: 0.0000069404236456\n",
      "Epoch: 9550/20000, Loss: 0.0000064500682129\n",
      "Epoch: 9560/20000, Loss: 0.0000064151731749\n",
      "Epoch: 9570/20000, Loss: 0.0000069635666478\n",
      "Epoch: 9580/20000, Loss: 0.0000202407190955\n",
      "Epoch: 9590/20000, Loss: 0.0000103594793472\n",
      "Epoch: 9600/20000, Loss: 0.0000104840091808\n",
      "Epoch: 9610/20000, Loss: 0.0000068580625339\n",
      "Epoch: 9620/20000, Loss: 0.0000067364817369\n",
      "Epoch: 9630/20000, Loss: 0.0000079269011621\n",
      "Epoch: 9640/20000, Loss: 0.0000112599809654\n",
      "Epoch: 9650/20000, Loss: 0.0000167792659340\n",
      "Epoch: 9660/20000, Loss: 0.0000127052662720\n",
      "Epoch: 9670/20000, Loss: 0.0000084048815552\n",
      "Epoch: 9680/20000, Loss: 0.0000071706881499\n",
      "Epoch: 9690/20000, Loss: 0.0000064533751356\n",
      "Epoch: 9700/20000, Loss: 0.0000061653468038\n",
      "Epoch: 9710/20000, Loss: 0.0000060709680838\n",
      "Epoch: 9720/20000, Loss: 0.0000061298674154\n",
      "Epoch: 9730/20000, Loss: 0.0000101741607068\n",
      "Epoch: 9740/20000, Loss: 0.0000310700052069\n",
      "Epoch: 9750/20000, Loss: 0.0000127301391331\n",
      "Epoch: 9760/20000, Loss: 0.0000073660985436\n",
      "Epoch: 9770/20000, Loss: 0.0000067761216087\n",
      "Epoch: 9780/20000, Loss: 0.0000064155792643\n",
      "Epoch: 9790/20000, Loss: 0.0000073109322329\n",
      "Epoch: 9800/20000, Loss: 0.0000197896806640\n",
      "Epoch: 9810/20000, Loss: 0.0000082613996710\n",
      "Epoch: 9820/20000, Loss: 0.0000066489242272\n",
      "Epoch: 9830/20000, Loss: 0.0000064827877395\n",
      "Epoch: 9840/20000, Loss: 0.0000064025693973\n",
      "Epoch: 9850/20000, Loss: 0.0000098056743809\n",
      "Epoch: 9860/20000, Loss: 0.0000074831496022\n",
      "Epoch: 9870/20000, Loss: 0.0000066429734034\n",
      "Epoch: 9880/20000, Loss: 0.0000062092294684\n",
      "Epoch: 9890/20000, Loss: 0.0000060515503719\n",
      "Epoch: 9900/20000, Loss: 0.0000061364344219\n",
      "Epoch: 9910/20000, Loss: 0.0000178709997272\n",
      "Epoch: 9920/20000, Loss: 0.0000132646664497\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 9930/20000, Loss: 0.0000084700095613\n",
      "Epoch: 9940/20000, Loss: 0.0000069037719186\n",
      "Epoch: 9950/20000, Loss: 0.0000061002479015\n",
      "Epoch: 9960/20000, Loss: 0.0000063492680056\n",
      "Epoch: 9970/20000, Loss: 0.0000160973013408\n",
      "Epoch: 9980/20000, Loss: 0.0000196037053684\n",
      "Epoch: 9990/20000, Loss: 0.0000116677974802\n",
      "Epoch: 10000/20000, Loss: 0.0000063102079366\n",
      "Epoch: 10010/20000, Loss: 0.0000062655781221\n",
      "Epoch: 10020/20000, Loss: 0.0000059731005422\n",
      "Epoch: 10030/20000, Loss: 0.0000070740611591\n",
      "Epoch: 10040/20000, Loss: 0.0000258305681200\n",
      "Epoch: 10050/20000, Loss: 0.0000120306249300\n",
      "Epoch: 10060/20000, Loss: 0.0000073835517469\n",
      "Epoch: 10070/20000, Loss: 0.0000059543895077\n",
      "Epoch: 10080/20000, Loss: 0.0000058273972172\n",
      "Epoch: 10090/20000, Loss: 0.0000057369602473\n",
      "Epoch: 10100/20000, Loss: 0.0000073725777838\n",
      "Epoch: 10110/20000, Loss: 0.0000169555005414\n",
      "Epoch: 10120/20000, Loss: 0.0000093430016932\n",
      "Epoch: 10130/20000, Loss: 0.0000082928709162\n",
      "Epoch: 10140/20000, Loss: 0.0000071327999649\n",
      "Epoch: 10150/20000, Loss: 0.0000064469845711\n",
      "Epoch: 10160/20000, Loss: 0.0000076413580246\n",
      "Epoch: 10170/20000, Loss: 0.0000143216975630\n",
      "Epoch: 10180/20000, Loss: 0.0000098215923572\n",
      "Epoch: 10190/20000, Loss: 0.0000059842705014\n",
      "Epoch: 10200/20000, Loss: 0.0000101617679320\n",
      "Epoch: 10210/20000, Loss: 0.0000120888071251\n",
      "Epoch: 10220/20000, Loss: 0.0000072371281021\n",
      "Epoch: 10230/20000, Loss: 0.0000061558075686\n",
      "Epoch: 10240/20000, Loss: 0.0000056938861235\n",
      "Epoch: 10250/20000, Loss: 0.0000059423132370\n",
      "Epoch: 10260/20000, Loss: 0.0000163027434610\n",
      "Epoch: 10270/20000, Loss: 0.0000109130578494\n",
      "Epoch: 10280/20000, Loss: 0.0000085416950242\n",
      "Epoch: 10290/20000, Loss: 0.0000080225590864\n",
      "Epoch: 10300/20000, Loss: 0.0000093968501460\n",
      "Epoch: 10310/20000, Loss: 0.0000077292806964\n",
      "Epoch: 10320/20000, Loss: 0.0000077617023635\n",
      "Epoch: 10330/20000, Loss: 0.0000076040455497\n",
      "Epoch: 10340/20000, Loss: 0.0000183338161150\n",
      "Epoch: 10350/20000, Loss: 0.0000081838788901\n",
      "Epoch: 10360/20000, Loss: 0.0000067210617090\n",
      "Epoch: 10370/20000, Loss: 0.0000058810132941\n",
      "Epoch: 10380/20000, Loss: 0.0000064708374339\n",
      "Epoch: 10390/20000, Loss: 0.0000146038692037\n",
      "Epoch: 10400/20000, Loss: 0.0000073295072980\n",
      "Epoch: 10410/20000, Loss: 0.0000071992208177\n",
      "Epoch: 10420/20000, Loss: 0.0000080221470853\n",
      "Epoch: 10430/20000, Loss: 0.0000073785181485\n",
      "Epoch: 10440/20000, Loss: 0.0000060251004470\n",
      "Epoch: 10450/20000, Loss: 0.0000071210429269\n",
      "Epoch: 10460/20000, Loss: 0.0000196106302610\n",
      "Epoch: 10470/20000, Loss: 0.0000122709370771\n",
      "Epoch: 10480/20000, Loss: 0.0000081481457528\n",
      "Epoch: 10490/20000, Loss: 0.0000072948892011\n",
      "Epoch: 10500/20000, Loss: 0.0000055279010667\n",
      "Epoch: 10510/20000, Loss: 0.0000052249934015\n",
      "Epoch: 10520/20000, Loss: 0.0000064703608587\n",
      "Epoch: 10530/20000, Loss: 0.0000189428028534\n",
      "Epoch: 10540/20000, Loss: 0.0000130464850372\n",
      "Epoch: 10550/20000, Loss: 0.0000072037896643\n",
      "Epoch: 10560/20000, Loss: 0.0000059319263528\n",
      "Epoch: 10570/20000, Loss: 0.0000050440908126\n",
      "Epoch: 10580/20000, Loss: 0.0000049897557801\n",
      "Epoch: 10590/20000, Loss: 0.0000056078733905\n",
      "Epoch: 10600/20000, Loss: 0.0000120773966046\n",
      "Epoch: 10610/20000, Loss: 0.0000075559432844\n",
      "Epoch: 10620/20000, Loss: 0.0000158592993103\n",
      "Epoch: 10630/20000, Loss: 0.0000093042499429\n",
      "Epoch: 10640/20000, Loss: 0.0000077978684203\n",
      "Epoch: 10650/20000, Loss: 0.0000053637413657\n",
      "Epoch: 10660/20000, Loss: 0.0000051788247220\n",
      "Epoch: 10670/20000, Loss: 0.0000049402910918\n",
      "Epoch: 10680/20000, Loss: 0.0000060858424149\n",
      "Epoch: 10690/20000, Loss: 0.0000131433425850\n",
      "Epoch: 10700/20000, Loss: 0.0000072972666203\n",
      "Epoch: 10710/20000, Loss: 0.0000137444139909\n",
      "Epoch: 10720/20000, Loss: 0.0000063127622525\n",
      "Epoch: 10730/20000, Loss: 0.0000054969914345\n",
      "Epoch: 10740/20000, Loss: 0.0000050407998060\n",
      "Epoch: 10750/20000, Loss: 0.0000047378434829\n",
      "Epoch: 10760/20000, Loss: 0.0000053289586504\n",
      "Epoch: 10770/20000, Loss: 0.0000244023558480\n",
      "Epoch: 10780/20000, Loss: 0.0000116212077046\n",
      "Epoch: 10790/20000, Loss: 0.0000062852350311\n",
      "Epoch: 10800/20000, Loss: 0.0000065537883529\n",
      "Epoch: 10810/20000, Loss: 0.0000075456382547\n",
      "Epoch: 10820/20000, Loss: 0.0000060620650402\n",
      "Epoch: 10830/20000, Loss: 0.0000056794087868\n",
      "Epoch: 10840/20000, Loss: 0.0000071335330176\n",
      "Epoch: 10850/20000, Loss: 0.0000080704903667\n",
      "Epoch: 10860/20000, Loss: 0.0000062407934820\n",
      "Epoch: 10870/20000, Loss: 0.0000066175311986\n",
      "Epoch: 10880/20000, Loss: 0.0000139435269375\n",
      "Epoch: 10890/20000, Loss: 0.0000079712126535\n",
      "Epoch: 10900/20000, Loss: 0.0000068021308834\n",
      "Epoch: 10910/20000, Loss: 0.0000049700515774\n",
      "Epoch: 10920/20000, Loss: 0.0000059863582464\n",
      "Epoch: 10930/20000, Loss: 0.0000122845694932\n",
      "Epoch: 10940/20000, Loss: 0.0000108115082185\n",
      "Epoch: 10950/20000, Loss: 0.0000052107234296\n",
      "Epoch: 10960/20000, Loss: 0.0000045663337005\n",
      "Epoch: 10970/20000, Loss: 0.0000046198374548\n",
      "Epoch: 10980/20000, Loss: 0.0000059132298702\n",
      "Epoch: 10990/20000, Loss: 0.0000121850016512\n",
      "Epoch: 11000/20000, Loss: 0.0000075752946032\n",
      "Epoch: 11010/20000, Loss: 0.0000067079081418\n",
      "Epoch: 11020/20000, Loss: 0.0000047131024985\n",
      "Epoch: 11030/20000, Loss: 0.0000063771590249\n",
      "Epoch: 11040/20000, Loss: 0.0000092678374131\n",
      "Epoch: 11050/20000, Loss: 0.0000165753353940\n",
      "Epoch: 11060/20000, Loss: 0.0000072850366450\n",
      "Epoch: 11070/20000, Loss: 0.0000048764900384\n",
      "Epoch: 11080/20000, Loss: 0.0000043702307266\n",
      "Epoch: 11090/20000, Loss: 0.0000044613366299\n",
      "Epoch: 11100/20000, Loss: 0.0000070328942456\n",
      "Epoch: 11110/20000, Loss: 0.0000092098889581\n",
      "Epoch: 11120/20000, Loss: 0.0000067136725193\n",
      "Epoch: 11130/20000, Loss: 0.0000068110934990\n",
      "Epoch: 11140/20000, Loss: 0.0000166851878021\n",
      "Epoch: 11150/20000, Loss: 0.0000074719700933\n",
      "Epoch: 11160/20000, Loss: 0.0000047622006605\n",
      "Epoch: 11170/20000, Loss: 0.0000042001702241\n",
      "Epoch: 11180/20000, Loss: 0.0000041157891246\n",
      "Epoch: 11190/20000, Loss: 0.0000070216829045\n",
      "Epoch: 11200/20000, Loss: 0.0000110117207441\n",
      "Epoch: 11210/20000, Loss: 0.0000106339148260\n",
      "Epoch: 11220/20000, Loss: 0.0000064349305831\n",
      "Epoch: 11230/20000, Loss: 0.0000070838973443\n",
      "Epoch: 11240/20000, Loss: 0.0000046004438445\n",
      "Epoch: 11250/20000, Loss: 0.0000042322858462\n",
      "Epoch: 11260/20000, Loss: 0.0000042450574256\n",
      "Epoch: 11270/20000, Loss: 0.0000110807604869\n",
      "Epoch: 11280/20000, Loss: 0.0000072146590355\n",
      "Epoch: 11290/20000, Loss: 0.0000056331323322\n",
      "Epoch: 11300/20000, Loss: 0.0000044881003305\n",
      "Epoch: 11310/20000, Loss: 0.0000039592164285\n",
      "Epoch: 11320/20000, Loss: 0.0000044700823310\n",
      "Epoch: 11330/20000, Loss: 0.0000141031032399\n",
      "Epoch: 11340/20000, Loss: 0.0000096893036243\n",
      "Epoch: 11350/20000, Loss: 0.0000050189496505\n",
      "Epoch: 11360/20000, Loss: 0.0000042122142077\n",
      "Epoch: 11370/20000, Loss: 0.0000044014054765\n",
      "Epoch: 11380/20000, Loss: 0.0000165384208231\n",
      "Epoch: 11390/20000, Loss: 0.0000082854421635\n",
      "Epoch: 11400/20000, Loss: 0.0000052899540606\n",
      "Epoch: 11410/20000, Loss: 0.0000039127248783\n",
      "Epoch: 11420/20000, Loss: 0.0000099321541711\n",
      "Epoch: 11430/20000, Loss: 0.0000055707828324\n",
      "Epoch: 11440/20000, Loss: 0.0000047879129852\n",
      "Epoch: 11450/20000, Loss: 0.0000038027078517\n",
      "Epoch: 11460/20000, Loss: 0.0000034393040096\n",
      "Epoch: 11470/20000, Loss: 0.0000034573763514\n",
      "Epoch: 11480/20000, Loss: 0.0000073050746323\n",
      "Epoch: 11490/20000, Loss: 0.0000079263500083\n",
      "Epoch: 11500/20000, Loss: 0.0000060402280724\n",
      "Epoch: 11510/20000, Loss: 0.0000043218014980\n",
      "Epoch: 11520/20000, Loss: 0.0000036747103422\n",
      "Epoch: 11530/20000, Loss: 0.0000038297093852\n",
      "Epoch: 11540/20000, Loss: 0.0000121414486784\n",
      "Epoch: 11550/20000, Loss: 0.0000090785943030\n",
      "Epoch: 11560/20000, Loss: 0.0000051726810852\n",
      "Epoch: 11570/20000, Loss: 0.0000043071081564\n",
      "Epoch: 11580/20000, Loss: 0.0000071947924880\n",
      "Epoch: 11590/20000, Loss: 0.0000063174779825\n",
      "Epoch: 11600/20000, Loss: 0.0000038925991248\n",
      "Epoch: 11610/20000, Loss: 0.0000035466362078\n",
      "Epoch: 11620/20000, Loss: 0.0000037079039430\n",
      "Epoch: 11630/20000, Loss: 0.0000048564793360\n",
      "Epoch: 11640/20000, Loss: 0.0000140490692502\n",
      "Epoch: 11650/20000, Loss: 0.0000063164816311\n",
      "Epoch: 11660/20000, Loss: 0.0000071076556196\n",
      "Epoch: 11670/20000, Loss: 0.0000105784110929\n",
      "Epoch: 11680/20000, Loss: 0.0000056455774029\n",
      "Epoch: 11690/20000, Loss: 0.0000037344852899\n",
      "Epoch: 11700/20000, Loss: 0.0000033076835280\n",
      "Epoch: 11710/20000, Loss: 0.0000031430597573\n",
      "Epoch: 11720/20000, Loss: 0.0000031753811527\n",
      "Epoch: 11730/20000, Loss: 0.0000071969593591\n",
      "Epoch: 11740/20000, Loss: 0.0000259769149125\n",
      "Epoch: 11750/20000, Loss: 0.0000081607540778\n",
      "Epoch: 11760/20000, Loss: 0.0000057599499996\n",
      "Epoch: 11770/20000, Loss: 0.0000041660946408\n",
      "Epoch: 11780/20000, Loss: 0.0000030873284231\n",
      "Epoch: 11790/20000, Loss: 0.0000030347141546\n",
      "Epoch: 11800/20000, Loss: 0.0000029185398489\n",
      "Epoch: 11810/20000, Loss: 0.0000028751978789\n",
      "Epoch: 11820/20000, Loss: 0.0000030739877275\n",
      "Epoch: 11830/20000, Loss: 0.0000253451180470\n",
      "Epoch: 11840/20000, Loss: 0.0000191600011021\n",
      "Epoch: 11850/20000, Loss: 0.0000077001704994\n",
      "Epoch: 11860/20000, Loss: 0.0000052254781622\n",
      "Epoch: 11870/20000, Loss: 0.0000035988371110\n",
      "Epoch: 11880/20000, Loss: 0.0000029870911931\n",
      "Epoch: 11890/20000, Loss: 0.0000028362421745\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 11900/20000, Loss: 0.0000028493586797\n",
      "Epoch: 11910/20000, Loss: 0.0000049757049965\n",
      "Epoch: 11920/20000, Loss: 0.0000037670133679\n",
      "Epoch: 11930/20000, Loss: 0.0000033625574360\n",
      "Epoch: 11940/20000, Loss: 0.0000030415785659\n",
      "Epoch: 11950/20000, Loss: 0.0000027700016290\n",
      "Epoch: 11960/20000, Loss: 0.0000026823415737\n",
      "Epoch: 11970/20000, Loss: 0.0000031278611914\n",
      "Epoch: 11980/20000, Loss: 0.0000344702093571\n",
      "Epoch: 11990/20000, Loss: 0.0000106397346826\n",
      "Epoch: 12000/20000, Loss: 0.0000049315153774\n",
      "Epoch: 12010/20000, Loss: 0.0000030993126074\n",
      "Epoch: 12020/20000, Loss: 0.0000028604540603\n",
      "Epoch: 12030/20000, Loss: 0.0000028145859687\n",
      "Epoch: 12040/20000, Loss: 0.0000057469683270\n",
      "Epoch: 12050/20000, Loss: 0.0000086171694420\n",
      "Epoch: 12060/20000, Loss: 0.0000059794165281\n",
      "Epoch: 12070/20000, Loss: 0.0000065695980993\n",
      "Epoch: 12080/20000, Loss: 0.0000045016417971\n",
      "Epoch: 12090/20000, Loss: 0.0000028962842862\n",
      "Epoch: 12100/20000, Loss: 0.0000031331471746\n",
      "Epoch: 12110/20000, Loss: 0.0000051049719332\n",
      "Epoch: 12120/20000, Loss: 0.0000141712471304\n",
      "Epoch: 12130/20000, Loss: 0.0000040547824938\n",
      "Epoch: 12140/20000, Loss: 0.0000028338733955\n",
      "Epoch: 12150/20000, Loss: 0.0000026814348075\n",
      "Epoch: 12160/20000, Loss: 0.0000026674902074\n",
      "Epoch: 12170/20000, Loss: 0.0000025822271255\n",
      "Epoch: 12180/20000, Loss: 0.0000066737325142\n",
      "Epoch: 12190/20000, Loss: 0.0000100321312857\n",
      "Epoch: 12200/20000, Loss: 0.0000056445001064\n",
      "Epoch: 12210/20000, Loss: 0.0000035605442008\n",
      "Epoch: 12220/20000, Loss: 0.0000028741562801\n",
      "Epoch: 12230/20000, Loss: 0.0000028008571462\n",
      "Epoch: 12240/20000, Loss: 0.0000037129373140\n",
      "Epoch: 12250/20000, Loss: 0.0000120839813462\n",
      "Epoch: 12260/20000, Loss: 0.0000119675742098\n",
      "Epoch: 12270/20000, Loss: 0.0000058220039136\n",
      "Epoch: 12280/20000, Loss: 0.0000042112146730\n",
      "Epoch: 12290/20000, Loss: 0.0000025442843707\n",
      "Epoch: 12300/20000, Loss: 0.0000024851990474\n",
      "Epoch: 12310/20000, Loss: 0.0000023708275876\n",
      "Epoch: 12320/20000, Loss: 0.0000028319284411\n",
      "Epoch: 12330/20000, Loss: 0.0000195502107090\n",
      "Epoch: 12340/20000, Loss: 0.0000095005771072\n",
      "Epoch: 12350/20000, Loss: 0.0000046724694585\n",
      "Epoch: 12360/20000, Loss: 0.0000026056409297\n",
      "Epoch: 12370/20000, Loss: 0.0000024761468467\n",
      "Epoch: 12380/20000, Loss: 0.0000025311499030\n",
      "Epoch: 12390/20000, Loss: 0.0000077420036178\n",
      "Epoch: 12400/20000, Loss: 0.0000104954015114\n",
      "Epoch: 12410/20000, Loss: 0.0000031555164242\n",
      "Epoch: 12420/20000, Loss: 0.0000034371523725\n",
      "Epoch: 12430/20000, Loss: 0.0000027035907806\n",
      "Epoch: 12440/20000, Loss: 0.0000034138129195\n",
      "Epoch: 12450/20000, Loss: 0.0000113101077659\n",
      "Epoch: 12460/20000, Loss: 0.0000044995008466\n",
      "Epoch: 12470/20000, Loss: 0.0000028522310913\n",
      "Epoch: 12480/20000, Loss: 0.0000022126230306\n",
      "Epoch: 12490/20000, Loss: 0.0000022548072138\n",
      "Epoch: 12500/20000, Loss: 0.0000023006980427\n",
      "Epoch: 12510/20000, Loss: 0.0000033761168652\n",
      "Epoch: 12520/20000, Loss: 0.0000129428399305\n",
      "Epoch: 12530/20000, Loss: 0.0000072129446380\n",
      "Epoch: 12540/20000, Loss: 0.0000058062523749\n",
      "Epoch: 12550/20000, Loss: 0.0000072667598943\n",
      "Epoch: 12560/20000, Loss: 0.0000036360484046\n",
      "Epoch: 12570/20000, Loss: 0.0000026241029900\n",
      "Epoch: 12580/20000, Loss: 0.0000023612631139\n",
      "Epoch: 12590/20000, Loss: 0.0000026201037144\n",
      "Epoch: 12600/20000, Loss: 0.0000081627094914\n",
      "Epoch: 12610/20000, Loss: 0.0000071973240665\n",
      "Epoch: 12620/20000, Loss: 0.0000037423749291\n",
      "Epoch: 12630/20000, Loss: 0.0000031618628782\n",
      "Epoch: 12640/20000, Loss: 0.0000052153413890\n",
      "Epoch: 12650/20000, Loss: 0.0000038463890633\n",
      "Epoch: 12660/20000, Loss: 0.0000040768991312\n",
      "Epoch: 12670/20000, Loss: 0.0000036462301978\n",
      "Epoch: 12680/20000, Loss: 0.0000030729459013\n",
      "Epoch: 12690/20000, Loss: 0.0000061843438743\n",
      "Epoch: 12700/20000, Loss: 0.0000137789120345\n",
      "Epoch: 12710/20000, Loss: 0.0000055088999034\n",
      "Epoch: 12720/20000, Loss: 0.0000044431712922\n",
      "Epoch: 12730/20000, Loss: 0.0000029730276765\n",
      "Epoch: 12740/20000, Loss: 0.0000072412362897\n",
      "Epoch: 12750/20000, Loss: 0.0000048403267101\n",
      "Epoch: 12760/20000, Loss: 0.0000036784397253\n",
      "Epoch: 12770/20000, Loss: 0.0000026630891625\n",
      "Epoch: 12780/20000, Loss: 0.0000048341644288\n",
      "Epoch: 12790/20000, Loss: 0.0000035163841403\n",
      "Epoch: 12800/20000, Loss: 0.0000045990263970\n",
      "Epoch: 12810/20000, Loss: 0.0000059797325775\n",
      "Epoch: 12820/20000, Loss: 0.0000066029265327\n",
      "Epoch: 12830/20000, Loss: 0.0000059484900703\n",
      "Epoch: 12840/20000, Loss: 0.0000040563186303\n",
      "Epoch: 12850/20000, Loss: 0.0000036394067138\n",
      "Epoch: 12860/20000, Loss: 0.0000041781877371\n",
      "Epoch: 12870/20000, Loss: 0.0000069432962846\n",
      "Epoch: 12880/20000, Loss: 0.0000029539548905\n",
      "Epoch: 12890/20000, Loss: 0.0000023997149583\n",
      "Epoch: 12900/20000, Loss: 0.0000035704574657\n",
      "Epoch: 12910/20000, Loss: 0.0000131111992232\n",
      "Epoch: 12920/20000, Loss: 0.0000075883035606\n",
      "Epoch: 12930/20000, Loss: 0.0000041256162149\n",
      "Epoch: 12940/20000, Loss: 0.0000039126593947\n",
      "Epoch: 12950/20000, Loss: 0.0000067868804763\n",
      "Epoch: 12960/20000, Loss: 0.0000033272010569\n",
      "Epoch: 12970/20000, Loss: 0.0000044324046939\n",
      "Epoch: 12980/20000, Loss: 0.0000068941549216\n",
      "Epoch: 12990/20000, Loss: 0.0000030108778901\n",
      "Epoch: 13000/20000, Loss: 0.0000031499075703\n",
      "Epoch: 13010/20000, Loss: 0.0000027896210213\n",
      "Epoch: 13020/20000, Loss: 0.0000057857869251\n",
      "Epoch: 13030/20000, Loss: 0.0000088413025878\n",
      "Epoch: 13040/20000, Loss: 0.0000074858148764\n",
      "Epoch: 13050/20000, Loss: 0.0000032883112908\n",
      "Epoch: 13060/20000, Loss: 0.0000022125823307\n",
      "Epoch: 13070/20000, Loss: 0.0000018898705321\n",
      "Epoch: 13080/20000, Loss: 0.0000018199295937\n",
      "Epoch: 13090/20000, Loss: 0.0000030625753880\n",
      "Epoch: 13100/20000, Loss: 0.0000294188066619\n",
      "Epoch: 13110/20000, Loss: 0.0000045390711421\n",
      "Epoch: 13120/20000, Loss: 0.0000047625571824\n",
      "Epoch: 13130/20000, Loss: 0.0000021131063477\n",
      "Epoch: 13140/20000, Loss: 0.0000020572449557\n",
      "Epoch: 13150/20000, Loss: 0.0000018656247676\n",
      "Epoch: 13160/20000, Loss: 0.0000026448817607\n",
      "Epoch: 13170/20000, Loss: 0.0000147470009324\n",
      "Epoch: 13180/20000, Loss: 0.0000120096801766\n",
      "Epoch: 13190/20000, Loss: 0.0000044659163905\n",
      "Epoch: 13200/20000, Loss: 0.0000027126611712\n",
      "Epoch: 13210/20000, Loss: 0.0000019568967673\n",
      "Epoch: 13220/20000, Loss: 0.0000017769001488\n",
      "Epoch: 13230/20000, Loss: 0.0000017953515226\n",
      "Epoch: 13240/20000, Loss: 0.0000026632435493\n",
      "Epoch: 13250/20000, Loss: 0.0000144562272908\n",
      "Epoch: 13260/20000, Loss: 0.0000067603336902\n",
      "Epoch: 13270/20000, Loss: 0.0000032958364500\n",
      "Epoch: 13280/20000, Loss: 0.0000023250493086\n",
      "Epoch: 13290/20000, Loss: 0.0000018515432885\n",
      "Epoch: 13300/20000, Loss: 0.0000016903254618\n",
      "Epoch: 13310/20000, Loss: 0.0000020473582936\n",
      "Epoch: 13320/20000, Loss: 0.0000134582360261\n",
      "Epoch: 13330/20000, Loss: 0.0000078281664173\n",
      "Epoch: 13340/20000, Loss: 0.0000071213626143\n",
      "Epoch: 13350/20000, Loss: 0.0000032037578421\n",
      "Epoch: 13360/20000, Loss: 0.0000023479622087\n",
      "Epoch: 13370/20000, Loss: 0.0000017989381149\n",
      "Epoch: 13380/20000, Loss: 0.0000029245220503\n",
      "Epoch: 13390/20000, Loss: 0.0000142845065056\n",
      "Epoch: 13400/20000, Loss: 0.0000058018622440\n",
      "Epoch: 13410/20000, Loss: 0.0000033368580716\n",
      "Epoch: 13420/20000, Loss: 0.0000021908472263\n",
      "Epoch: 13430/20000, Loss: 0.0000020361551378\n",
      "Epoch: 13440/20000, Loss: 0.0000068919521254\n",
      "Epoch: 13450/20000, Loss: 0.0000066478210101\n",
      "Epoch: 13460/20000, Loss: 0.0000054717979765\n",
      "Epoch: 13470/20000, Loss: 0.0000035067573663\n",
      "Epoch: 13480/20000, Loss: 0.0000024914561436\n",
      "Epoch: 13490/20000, Loss: 0.0000018662028651\n",
      "Epoch: 13500/20000, Loss: 0.0000017388197193\n",
      "Epoch: 13510/20000, Loss: 0.0000020874183519\n",
      "Epoch: 13520/20000, Loss: 0.0000076352835094\n",
      "Epoch: 13530/20000, Loss: 0.0000107672158265\n",
      "Epoch: 13540/20000, Loss: 0.0000040874715523\n",
      "Epoch: 13550/20000, Loss: 0.0000029493307920\n",
      "Epoch: 13560/20000, Loss: 0.0000026487687137\n",
      "Epoch: 13570/20000, Loss: 0.0000046574955377\n",
      "Epoch: 13580/20000, Loss: 0.0000065161516432\n",
      "Epoch: 13590/20000, Loss: 0.0000030695794067\n",
      "Epoch: 13600/20000, Loss: 0.0000030300795970\n",
      "Epoch: 13610/20000, Loss: 0.0000018412980580\n",
      "Epoch: 13620/20000, Loss: 0.0000022525539407\n",
      "Epoch: 13630/20000, Loss: 0.0000070687879088\n",
      "Epoch: 13640/20000, Loss: 0.0000050439530241\n",
      "Epoch: 13650/20000, Loss: 0.0000042529873099\n",
      "Epoch: 13660/20000, Loss: 0.0000066460952439\n",
      "Epoch: 13670/20000, Loss: 0.0000044489056563\n",
      "Epoch: 13680/20000, Loss: 0.0000049812601901\n",
      "Epoch: 13690/20000, Loss: 0.0000026047298434\n",
      "Epoch: 13700/20000, Loss: 0.0000021836322048\n",
      "Epoch: 13710/20000, Loss: 0.0000022617755349\n",
      "Epoch: 13720/20000, Loss: 0.0000079614164861\n",
      "Epoch: 13730/20000, Loss: 0.0000066468210207\n",
      "Epoch: 13740/20000, Loss: 0.0000044873918341\n",
      "Epoch: 13750/20000, Loss: 0.0000030169428555\n",
      "Epoch: 13760/20000, Loss: 0.0000022330693810\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 13770/20000, Loss: 0.0000024309151740\n",
      "Epoch: 13780/20000, Loss: 0.0000051653796618\n",
      "Epoch: 13790/20000, Loss: 0.0000076046089816\n",
      "Epoch: 13800/20000, Loss: 0.0000108878894025\n",
      "Epoch: 13810/20000, Loss: 0.0000052389063967\n",
      "Epoch: 13820/20000, Loss: 0.0000028530575946\n",
      "Epoch: 13830/20000, Loss: 0.0000024727337404\n",
      "Epoch: 13840/20000, Loss: 0.0000034060801681\n",
      "Epoch: 13850/20000, Loss: 0.0000057100410231\n",
      "Epoch: 13860/20000, Loss: 0.0000063679985942\n",
      "Epoch: 13870/20000, Loss: 0.0000020418042368\n",
      "Epoch: 13880/20000, Loss: 0.0000021706905500\n",
      "Epoch: 13890/20000, Loss: 0.0000018989034061\n",
      "Epoch: 13900/20000, Loss: 0.0000030551341297\n",
      "Epoch: 13910/20000, Loss: 0.0000086410955191\n",
      "Epoch: 13920/20000, Loss: 0.0000079990550148\n",
      "Epoch: 13930/20000, Loss: 0.0000082123378888\n",
      "Epoch: 13940/20000, Loss: 0.0000028457363896\n",
      "Epoch: 13950/20000, Loss: 0.0000021118180484\n",
      "Epoch: 13960/20000, Loss: 0.0000018154918280\n",
      "Epoch: 13970/20000, Loss: 0.0000020169961772\n",
      "Epoch: 13980/20000, Loss: 0.0000046639793254\n",
      "Epoch: 13990/20000, Loss: 0.0000088681317720\n",
      "Epoch: 14000/20000, Loss: 0.0000047536227612\n",
      "Epoch: 14010/20000, Loss: 0.0000042096326069\n",
      "Epoch: 14020/20000, Loss: 0.0000050898474910\n",
      "Epoch: 14030/20000, Loss: 0.0000036678250126\n",
      "Epoch: 14040/20000, Loss: 0.0000035401467358\n",
      "Epoch: 14050/20000, Loss: 0.0000032281880067\n",
      "Epoch: 14060/20000, Loss: 0.0000051552929108\n",
      "Epoch: 14070/20000, Loss: 0.0000059911881181\n",
      "Epoch: 14080/20000, Loss: 0.0000038442017285\n",
      "Epoch: 14090/20000, Loss: 0.0000030158416848\n",
      "Epoch: 14100/20000, Loss: 0.0000034539589251\n",
      "Epoch: 14110/20000, Loss: 0.0000028540785024\n",
      "Epoch: 14120/20000, Loss: 0.0000024373189262\n",
      "Epoch: 14130/20000, Loss: 0.0000029424161312\n",
      "Epoch: 14140/20000, Loss: 0.0000061904606810\n",
      "Epoch: 14150/20000, Loss: 0.0000127912999233\n",
      "Epoch: 14160/20000, Loss: 0.0000027307189612\n",
      "Epoch: 14170/20000, Loss: 0.0000020343863980\n",
      "Epoch: 14180/20000, Loss: 0.0000018530248553\n",
      "Epoch: 14190/20000, Loss: 0.0000016472126845\n",
      "Epoch: 14200/20000, Loss: 0.0000016925888531\n",
      "Epoch: 14210/20000, Loss: 0.0000056502544794\n",
      "Epoch: 14220/20000, Loss: 0.0000125415463117\n",
      "Epoch: 14230/20000, Loss: 0.0000045926476560\n",
      "Epoch: 14240/20000, Loss: 0.0000032472057683\n",
      "Epoch: 14250/20000, Loss: 0.0000017203592506\n",
      "Epoch: 14260/20000, Loss: 0.0000015929066421\n",
      "Epoch: 14270/20000, Loss: 0.0000015324678770\n",
      "Epoch: 14280/20000, Loss: 0.0000016846910285\n",
      "Epoch: 14290/20000, Loss: 0.0000083796812760\n",
      "Epoch: 14300/20000, Loss: 0.0000116746741696\n",
      "Epoch: 14310/20000, Loss: 0.0000076294081737\n",
      "Epoch: 14320/20000, Loss: 0.0000025919380278\n",
      "Epoch: 14330/20000, Loss: 0.0000024210085030\n",
      "Epoch: 14340/20000, Loss: 0.0000055015370890\n",
      "Epoch: 14350/20000, Loss: 0.0000017760921764\n",
      "Epoch: 14360/20000, Loss: 0.0000024600824418\n",
      "Epoch: 14370/20000, Loss: 0.0000101900059235\n",
      "Epoch: 14380/20000, Loss: 0.0000040754844122\n",
      "Epoch: 14390/20000, Loss: 0.0000024844048312\n",
      "Epoch: 14400/20000, Loss: 0.0000017458505681\n",
      "Epoch: 14410/20000, Loss: 0.0000015575506040\n",
      "Epoch: 14420/20000, Loss: 0.0000017137429040\n",
      "Epoch: 14430/20000, Loss: 0.0000072175516834\n",
      "Epoch: 14440/20000, Loss: 0.0000055620184867\n",
      "Epoch: 14450/20000, Loss: 0.0000035367902456\n",
      "Epoch: 14460/20000, Loss: 0.0000020998613763\n",
      "Epoch: 14470/20000, Loss: 0.0000020648290047\n",
      "Epoch: 14480/20000, Loss: 0.0000081148837126\n",
      "Epoch: 14490/20000, Loss: 0.0000085541805674\n",
      "Epoch: 14500/20000, Loss: 0.0000037282291032\n",
      "Epoch: 14510/20000, Loss: 0.0000027105872960\n",
      "Epoch: 14520/20000, Loss: 0.0000016930814581\n",
      "Epoch: 14530/20000, Loss: 0.0000015638705690\n",
      "Epoch: 14540/20000, Loss: 0.0000017510913040\n",
      "Epoch: 14550/20000, Loss: 0.0000050629273574\n",
      "Epoch: 14560/20000, Loss: 0.0000119648348118\n",
      "Epoch: 14570/20000, Loss: 0.0000046262580327\n",
      "Epoch: 14580/20000, Loss: 0.0000020872419100\n",
      "Epoch: 14590/20000, Loss: 0.0000016251468651\n",
      "Epoch: 14600/20000, Loss: 0.0000015570534515\n",
      "Epoch: 14610/20000, Loss: 0.0000014960961607\n",
      "Epoch: 14620/20000, Loss: 0.0000022572930902\n",
      "Epoch: 14630/20000, Loss: 0.0000149420511661\n",
      "Epoch: 14640/20000, Loss: 0.0000082154556367\n",
      "Epoch: 14650/20000, Loss: 0.0000041508178583\n",
      "Epoch: 14660/20000, Loss: 0.0000030640974273\n",
      "Epoch: 14670/20000, Loss: 0.0000036911451389\n",
      "Epoch: 14680/20000, Loss: 0.0000054792199080\n",
      "Epoch: 14690/20000, Loss: 0.0000020792178930\n",
      "Epoch: 14700/20000, Loss: 0.0000019103956674\n",
      "Epoch: 14710/20000, Loss: 0.0000019348797196\n",
      "Epoch: 14720/20000, Loss: 0.0000051514175539\n",
      "Epoch: 14730/20000, Loss: 0.0000083134746092\n",
      "Epoch: 14740/20000, Loss: 0.0000042104556996\n",
      "Epoch: 14750/20000, Loss: 0.0000034034173950\n",
      "Epoch: 14760/20000, Loss: 0.0000030411069929\n",
      "Epoch: 14770/20000, Loss: 0.0000020312877496\n",
      "Epoch: 14780/20000, Loss: 0.0000015470143353\n",
      "Epoch: 14790/20000, Loss: 0.0000036489195736\n",
      "Epoch: 14800/20000, Loss: 0.0000215558538912\n",
      "Epoch: 14810/20000, Loss: 0.0000025118338272\n",
      "Epoch: 14820/20000, Loss: 0.0000039251017370\n",
      "Epoch: 14830/20000, Loss: 0.0000016663337874\n",
      "Epoch: 14840/20000, Loss: 0.0000016327810499\n",
      "Epoch: 14850/20000, Loss: 0.0000014602445617\n",
      "Epoch: 14860/20000, Loss: 0.0000015580699255\n",
      "Epoch: 14870/20000, Loss: 0.0000089766599558\n",
      "Epoch: 14880/20000, Loss: 0.0000043178088163\n",
      "Epoch: 14890/20000, Loss: 0.0000050923413255\n",
      "Epoch: 14900/20000, Loss: 0.0000025491658562\n",
      "Epoch: 14910/20000, Loss: 0.0000017597500346\n",
      "Epoch: 14920/20000, Loss: 0.0000015601707446\n",
      "Epoch: 14930/20000, Loss: 0.0000025120709779\n",
      "Epoch: 14940/20000, Loss: 0.0000113748019430\n",
      "Epoch: 14950/20000, Loss: 0.0000034304709970\n",
      "Epoch: 14960/20000, Loss: 0.0000026484169666\n",
      "Epoch: 14970/20000, Loss: 0.0000028817905786\n",
      "Epoch: 14980/20000, Loss: 0.0000052449340728\n",
      "Epoch: 14990/20000, Loss: 0.0000022323486064\n",
      "Epoch: 15000/20000, Loss: 0.0000018466026859\n",
      "Epoch: 15010/20000, Loss: 0.0000021732769255\n",
      "Epoch: 15020/20000, Loss: 0.0000063822940319\n",
      "Epoch: 15030/20000, Loss: 0.0000057783145166\n",
      "Epoch: 15040/20000, Loss: 0.0000033825249375\n",
      "Epoch: 15050/20000, Loss: 0.0000019425065148\n",
      "Epoch: 15060/20000, Loss: 0.0000018859285547\n",
      "Epoch: 15070/20000, Loss: 0.0000046539753384\n",
      "Epoch: 15080/20000, Loss: 0.0000063380693973\n",
      "Epoch: 15090/20000, Loss: 0.0000031050833513\n",
      "Epoch: 15100/20000, Loss: 0.0000046120817387\n",
      "Epoch: 15110/20000, Loss: 0.0000027138235055\n",
      "Epoch: 15120/20000, Loss: 0.0000019032565888\n",
      "Epoch: 15130/20000, Loss: 0.0000025602414553\n",
      "Epoch: 15140/20000, Loss: 0.0000074103331826\n",
      "Epoch: 15150/20000, Loss: 0.0000113117248475\n",
      "Epoch: 15160/20000, Loss: 0.0000040753352550\n",
      "Epoch: 15170/20000, Loss: 0.0000026077259463\n",
      "Epoch: 15180/20000, Loss: 0.0000016316055280\n",
      "Epoch: 15190/20000, Loss: 0.0000014673075839\n",
      "Epoch: 15200/20000, Loss: 0.0000019879050797\n",
      "Epoch: 15210/20000, Loss: 0.0000188635422091\n",
      "Epoch: 15220/20000, Loss: 0.0000079117398855\n",
      "Epoch: 15230/20000, Loss: 0.0000036214696593\n",
      "Epoch: 15240/20000, Loss: 0.0000023604081889\n",
      "Epoch: 15250/20000, Loss: 0.0000017046332914\n",
      "Epoch: 15260/20000, Loss: 0.0000018847139245\n",
      "Epoch: 15270/20000, Loss: 0.0000044465214160\n",
      "Epoch: 15280/20000, Loss: 0.0000068369949986\n",
      "Epoch: 15290/20000, Loss: 0.0000028418990041\n",
      "Epoch: 15300/20000, Loss: 0.0000020226477773\n",
      "Epoch: 15310/20000, Loss: 0.0000019518324734\n",
      "Epoch: 15320/20000, Loss: 0.0000015769913944\n",
      "Epoch: 15330/20000, Loss: 0.0000049491750360\n",
      "Epoch: 15340/20000, Loss: 0.0000107095765998\n",
      "Epoch: 15350/20000, Loss: 0.0000064935147748\n",
      "Epoch: 15360/20000, Loss: 0.0000018663339461\n",
      "Epoch: 15370/20000, Loss: 0.0000018202863430\n",
      "Epoch: 15380/20000, Loss: 0.0000015975427914\n",
      "Epoch: 15390/20000, Loss: 0.0000019880128548\n",
      "Epoch: 15400/20000, Loss: 0.0000102615067590\n",
      "Epoch: 15410/20000, Loss: 0.0000054971537793\n",
      "Epoch: 15420/20000, Loss: 0.0000055746700127\n",
      "Epoch: 15430/20000, Loss: 0.0000036153455767\n",
      "Epoch: 15440/20000, Loss: 0.0000018092199525\n",
      "Epoch: 15450/20000, Loss: 0.0000014641065036\n",
      "Epoch: 15460/20000, Loss: 0.0000016051471903\n",
      "Epoch: 15470/20000, Loss: 0.0000026097309274\n",
      "Epoch: 15480/20000, Loss: 0.0000148468097905\n",
      "Epoch: 15490/20000, Loss: 0.0000060302613747\n",
      "Epoch: 15500/20000, Loss: 0.0000026144523417\n",
      "Epoch: 15510/20000, Loss: 0.0000015729248162\n",
      "Epoch: 15520/20000, Loss: 0.0000015377404452\n",
      "Epoch: 15530/20000, Loss: 0.0000022039339456\n",
      "Epoch: 15540/20000, Loss: 0.0000150678106365\n",
      "Epoch: 15550/20000, Loss: 0.0000039292817746\n",
      "Epoch: 15560/20000, Loss: 0.0000031484519241\n",
      "Epoch: 15570/20000, Loss: 0.0000021136090709\n",
      "Epoch: 15580/20000, Loss: 0.0000016175501969\n",
      "Epoch: 15590/20000, Loss: 0.0000015113213294\n",
      "Epoch: 15600/20000, Loss: 0.0000027952648907\n",
      "Epoch: 15610/20000, Loss: 0.0000091119536592\n",
      "Epoch: 15620/20000, Loss: 0.0000085093060989\n",
      "Epoch: 15630/20000, Loss: 0.0000027614735245\n",
      "Epoch: 15640/20000, Loss: 0.0000020829547793\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 15650/20000, Loss: 0.0000017657703211\n",
      "Epoch: 15660/20000, Loss: 0.0000013977472690\n",
      "Epoch: 15670/20000, Loss: 0.0000013884020973\n",
      "Epoch: 15680/20000, Loss: 0.0000024566204502\n",
      "Epoch: 15690/20000, Loss: 0.0000067353521445\n",
      "Epoch: 15700/20000, Loss: 0.0000086616109911\n",
      "Epoch: 15710/20000, Loss: 0.0000062460135268\n",
      "Epoch: 15720/20000, Loss: 0.0000022802839794\n",
      "Epoch: 15730/20000, Loss: 0.0000018188842432\n",
      "Epoch: 15740/20000, Loss: 0.0000016575380641\n",
      "Epoch: 15750/20000, Loss: 0.0000016199610400\n",
      "Epoch: 15760/20000, Loss: 0.0000041536327444\n",
      "Epoch: 15770/20000, Loss: 0.0000064174519139\n",
      "Epoch: 15780/20000, Loss: 0.0000090973644546\n",
      "Epoch: 15790/20000, Loss: 0.0000050165258472\n",
      "Epoch: 15800/20000, Loss: 0.0000028550214211\n",
      "Epoch: 15810/20000, Loss: 0.0000017127713363\n",
      "Epoch: 15820/20000, Loss: 0.0000015739577748\n",
      "Epoch: 15830/20000, Loss: 0.0000015156044810\n",
      "Epoch: 15840/20000, Loss: 0.0000067049118115\n",
      "Epoch: 15850/20000, Loss: 0.0000042653887249\n",
      "Epoch: 15860/20000, Loss: 0.0000072981265475\n",
      "Epoch: 15870/20000, Loss: 0.0000030870758110\n",
      "Epoch: 15880/20000, Loss: 0.0000022723777420\n",
      "Epoch: 15890/20000, Loss: 0.0000015614576796\n",
      "Epoch: 15900/20000, Loss: 0.0000013518188098\n",
      "Epoch: 15910/20000, Loss: 0.0000019241012978\n",
      "Epoch: 15920/20000, Loss: 0.0000116800092655\n",
      "Epoch: 15930/20000, Loss: 0.0000091159736257\n",
      "Epoch: 15940/20000, Loss: 0.0000059983076426\n",
      "Epoch: 15950/20000, Loss: 0.0000054044066928\n",
      "Epoch: 15960/20000, Loss: 0.0000019772126052\n",
      "Epoch: 15970/20000, Loss: 0.0000017010083866\n",
      "Epoch: 15980/20000, Loss: 0.0000013841662394\n",
      "Epoch: 15990/20000, Loss: 0.0000014486504369\n",
      "Epoch: 16000/20000, Loss: 0.0000026331165373\n",
      "Epoch: 16010/20000, Loss: 0.0000128203682834\n",
      "Epoch: 16020/20000, Loss: 0.0000051070028348\n",
      "Epoch: 16030/20000, Loss: 0.0000039699052650\n",
      "Epoch: 16040/20000, Loss: 0.0000018679274945\n",
      "Epoch: 16050/20000, Loss: 0.0000016376451413\n",
      "Epoch: 16060/20000, Loss: 0.0000015579013279\n",
      "Epoch: 16070/20000, Loss: 0.0000022496528800\n",
      "Epoch: 16080/20000, Loss: 0.0000092095142463\n",
      "Epoch: 16090/20000, Loss: 0.0000022144126888\n",
      "Epoch: 16100/20000, Loss: 0.0000021775319965\n",
      "Epoch: 16110/20000, Loss: 0.0000020728948584\n",
      "Epoch: 16120/20000, Loss: 0.0000031737899917\n",
      "Epoch: 16130/20000, Loss: 0.0000061296204876\n",
      "Epoch: 16140/20000, Loss: 0.0000048893780331\n",
      "Epoch: 16150/20000, Loss: 0.0000024967328045\n",
      "Epoch: 16160/20000, Loss: 0.0000020659349502\n",
      "Epoch: 16170/20000, Loss: 0.0000072588181865\n",
      "Epoch: 16180/20000, Loss: 0.0000023674544991\n",
      "Epoch: 16190/20000, Loss: 0.0000026958787203\n",
      "Epoch: 16200/20000, Loss: 0.0000037256484120\n",
      "Epoch: 16210/20000, Loss: 0.0000031660645163\n",
      "Epoch: 16220/20000, Loss: 0.0000031715244404\n",
      "Epoch: 16230/20000, Loss: 0.0000026900327157\n",
      "Epoch: 16240/20000, Loss: 0.0000021319535790\n",
      "Epoch: 16250/20000, Loss: 0.0000023658826649\n",
      "Epoch: 16260/20000, Loss: 0.0000049168083933\n",
      "Epoch: 16270/20000, Loss: 0.0000069239245022\n",
      "Epoch: 16280/20000, Loss: 0.0000058382183852\n",
      "Epoch: 16290/20000, Loss: 0.0000029182463095\n",
      "Epoch: 16300/20000, Loss: 0.0000020808038244\n",
      "Epoch: 16310/20000, Loss: 0.0000031241572742\n",
      "Epoch: 16320/20000, Loss: 0.0000033115045426\n",
      "Epoch: 16330/20000, Loss: 0.0000028729589303\n",
      "Epoch: 16340/20000, Loss: 0.0000052392269936\n",
      "Epoch: 16350/20000, Loss: 0.0000036000958517\n",
      "Epoch: 16360/20000, Loss: 0.0000040151153371\n",
      "Epoch: 16370/20000, Loss: 0.0000027435000902\n",
      "Epoch: 16380/20000, Loss: 0.0000037950760543\n",
      "Epoch: 16390/20000, Loss: 0.0000030072974369\n",
      "Epoch: 16400/20000, Loss: 0.0000032724080938\n",
      "Epoch: 16410/20000, Loss: 0.0000040882509893\n",
      "Epoch: 16420/20000, Loss: 0.0000076121446000\n",
      "Epoch: 16430/20000, Loss: 0.0000062396152316\n",
      "Epoch: 16440/20000, Loss: 0.0000024764128739\n",
      "Epoch: 16450/20000, Loss: 0.0000016090951931\n",
      "Epoch: 16460/20000, Loss: 0.0000013360229332\n",
      "Epoch: 16470/20000, Loss: 0.0000015320580360\n",
      "Epoch: 16480/20000, Loss: 0.0000062689018705\n",
      "Epoch: 16490/20000, Loss: 0.0000106374382085\n",
      "Epoch: 16500/20000, Loss: 0.0000057778879636\n",
      "Epoch: 16510/20000, Loss: 0.0000023780987704\n",
      "Epoch: 16520/20000, Loss: 0.0000019003106217\n",
      "Epoch: 16530/20000, Loss: 0.0000014540169104\n",
      "Epoch: 16540/20000, Loss: 0.0000013219389530\n",
      "Epoch: 16550/20000, Loss: 0.0000046886561904\n",
      "Epoch: 16560/20000, Loss: 0.0000053890894378\n",
      "Epoch: 16570/20000, Loss: 0.0000016571952983\n",
      "Epoch: 16580/20000, Loss: 0.0000015883229025\n",
      "Epoch: 16590/20000, Loss: 0.0000014650011053\n",
      "Epoch: 16600/20000, Loss: 0.0000014662165313\n",
      "Epoch: 16610/20000, Loss: 0.0000062477356551\n",
      "Epoch: 16620/20000, Loss: 0.0000046821451178\n",
      "Epoch: 16630/20000, Loss: 0.0000062354479269\n",
      "Epoch: 16640/20000, Loss: 0.0000026684583645\n",
      "Epoch: 16650/20000, Loss: 0.0000014834103013\n",
      "Epoch: 16660/20000, Loss: 0.0000013876299363\n",
      "Epoch: 16670/20000, Loss: 0.0000015229283008\n",
      "Epoch: 16680/20000, Loss: 0.0000069409193202\n",
      "Epoch: 16690/20000, Loss: 0.0000051026595429\n",
      "Epoch: 16700/20000, Loss: 0.0000017449079905\n",
      "Epoch: 16710/20000, Loss: 0.0000016648278915\n",
      "Epoch: 16720/20000, Loss: 0.0000014615330883\n",
      "Epoch: 16730/20000, Loss: 0.0000012935919358\n",
      "Epoch: 16740/20000, Loss: 0.0000012655923456\n",
      "Epoch: 16750/20000, Loss: 0.0000035533728351\n",
      "Epoch: 16760/20000, Loss: 0.0000081074713307\n",
      "Epoch: 16770/20000, Loss: 0.0000051388738029\n",
      "Epoch: 16780/20000, Loss: 0.0000052267532737\n",
      "Epoch: 16790/20000, Loss: 0.0000019716555926\n",
      "Epoch: 16800/20000, Loss: 0.0000016126329001\n",
      "Epoch: 16810/20000, Loss: 0.0000014523541267\n",
      "Epoch: 16820/20000, Loss: 0.0000076663836808\n",
      "Epoch: 16830/20000, Loss: 0.0000036887602164\n",
      "Epoch: 16840/20000, Loss: 0.0000033084870665\n",
      "Epoch: 16850/20000, Loss: 0.0000025542083222\n",
      "Epoch: 16860/20000, Loss: 0.0000098550472103\n",
      "Epoch: 16870/20000, Loss: 0.0000027310813948\n",
      "Epoch: 16880/20000, Loss: 0.0000018804395268\n",
      "Epoch: 16890/20000, Loss: 0.0000014243797750\n",
      "Epoch: 16900/20000, Loss: 0.0000012094807289\n",
      "Epoch: 16910/20000, Loss: 0.0000019951523882\n",
      "Epoch: 16920/20000, Loss: 0.0000107645209937\n",
      "Epoch: 16930/20000, Loss: 0.0000031018594200\n",
      "Epoch: 16940/20000, Loss: 0.0000017253344140\n",
      "Epoch: 16950/20000, Loss: 0.0000013534263417\n",
      "Epoch: 16960/20000, Loss: 0.0000012667700275\n",
      "Epoch: 16970/20000, Loss: 0.0000035880580072\n",
      "Epoch: 16980/20000, Loss: 0.0000076391615949\n",
      "Epoch: 16990/20000, Loss: 0.0000053395642681\n",
      "Epoch: 17000/20000, Loss: 0.0000036851304230\n",
      "Epoch: 17010/20000, Loss: 0.0000020098707409\n",
      "Epoch: 17020/20000, Loss: 0.0000014840361473\n",
      "Epoch: 17030/20000, Loss: 0.0000013142234820\n",
      "Epoch: 17040/20000, Loss: 0.0000019970268568\n",
      "Epoch: 17050/20000, Loss: 0.0000058752711993\n",
      "Epoch: 17060/20000, Loss: 0.0000104334685602\n",
      "Epoch: 17070/20000, Loss: 0.0000072778689173\n",
      "Epoch: 17080/20000, Loss: 0.0000025430388177\n",
      "Epoch: 17090/20000, Loss: 0.0000015736706018\n",
      "Epoch: 17100/20000, Loss: 0.0000012062376982\n",
      "Epoch: 17110/20000, Loss: 0.0000011797395700\n",
      "Epoch: 17120/20000, Loss: 0.0000014582631138\n",
      "Epoch: 17130/20000, Loss: 0.0000068617960096\n",
      "Epoch: 17140/20000, Loss: 0.0000043973991524\n",
      "Epoch: 17150/20000, Loss: 0.0000023971067549\n",
      "Epoch: 17160/20000, Loss: 0.0000046252312131\n",
      "Epoch: 17170/20000, Loss: 0.0000017549027689\n",
      "Epoch: 17180/20000, Loss: 0.0000013738857660\n",
      "Epoch: 17190/20000, Loss: 0.0000014982435914\n",
      "Epoch: 17200/20000, Loss: 0.0000071929748628\n",
      "Epoch: 17210/20000, Loss: 0.0000057242032199\n",
      "Epoch: 17220/20000, Loss: 0.0000023900438464\n",
      "Epoch: 17230/20000, Loss: 0.0000014908971480\n",
      "Epoch: 17240/20000, Loss: 0.0000012629930097\n",
      "Epoch: 17250/20000, Loss: 0.0000010766605101\n",
      "Epoch: 17260/20000, Loss: 0.0000011032398106\n",
      "Epoch: 17270/20000, Loss: 0.0000023187712941\n",
      "Epoch: 17280/20000, Loss: 0.0000099556891655\n",
      "Epoch: 17290/20000, Loss: 0.0000080341615103\n",
      "Epoch: 17300/20000, Loss: 0.0000023052259621\n",
      "Epoch: 17310/20000, Loss: 0.0000034672793845\n",
      "Epoch: 17320/20000, Loss: 0.0000053442236094\n",
      "Epoch: 17330/20000, Loss: 0.0000029862464999\n",
      "Epoch: 17340/20000, Loss: 0.0000023877194053\n",
      "Epoch: 17350/20000, Loss: 0.0000050352832659\n",
      "Epoch: 17360/20000, Loss: 0.0000019972221708\n",
      "Epoch: 17370/20000, Loss: 0.0000025948559141\n",
      "Epoch: 17380/20000, Loss: 0.0000028980227853\n",
      "Epoch: 17390/20000, Loss: 0.0000017291233689\n",
      "Epoch: 17400/20000, Loss: 0.0000032158943668\n",
      "Epoch: 17410/20000, Loss: 0.0000083614577306\n",
      "Epoch: 17420/20000, Loss: 0.0000029913364870\n",
      "Epoch: 17430/20000, Loss: 0.0000017306833797\n",
      "Epoch: 17440/20000, Loss: 0.0000015846409269\n",
      "Epoch: 17450/20000, Loss: 0.0000022654057830\n",
      "Epoch: 17460/20000, Loss: 0.0000068963581725\n",
      "Epoch: 17470/20000, Loss: 0.0000030681640055\n",
      "Epoch: 17480/20000, Loss: 0.0000026575787615\n",
      "Epoch: 17490/20000, Loss: 0.0000059908761614\n",
      "Epoch: 17500/20000, Loss: 0.0000045989054342\n",
      "Epoch: 17510/20000, Loss: 0.0000026690697723\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 17520/20000, Loss: 0.0000016126093669\n",
      "Epoch: 17530/20000, Loss: 0.0000017349266273\n",
      "Epoch: 17540/20000, Loss: 0.0000037909721868\n",
      "Epoch: 17550/20000, Loss: 0.0000028832544103\n",
      "Epoch: 17560/20000, Loss: 0.0000030568185139\n",
      "Epoch: 17570/20000, Loss: 0.0000112718880700\n",
      "Epoch: 17580/20000, Loss: 0.0000045016809054\n",
      "Epoch: 17590/20000, Loss: 0.0000026955747217\n",
      "Epoch: 17600/20000, Loss: 0.0000014217227999\n",
      "Epoch: 17610/20000, Loss: 0.0000011707114709\n",
      "Epoch: 17620/20000, Loss: 0.0000013849511333\n",
      "Epoch: 17630/20000, Loss: 0.0000074969534580\n",
      "Epoch: 17640/20000, Loss: 0.0000084431994765\n",
      "Epoch: 17650/20000, Loss: 0.0000031499569104\n",
      "Epoch: 17660/20000, Loss: 0.0000013270049521\n",
      "Epoch: 17670/20000, Loss: 0.0000010751857644\n",
      "Epoch: 17680/20000, Loss: 0.0000011917300071\n",
      "Epoch: 17690/20000, Loss: 0.0000044274293032\n",
      "Epoch: 17700/20000, Loss: 0.0000061843707044\n",
      "Epoch: 17710/20000, Loss: 0.0000045793062782\n",
      "Epoch: 17720/20000, Loss: 0.0000020931670406\n",
      "Epoch: 17730/20000, Loss: 0.0000018100195120\n",
      "Epoch: 17740/20000, Loss: 0.0000028514714359\n",
      "Epoch: 17750/20000, Loss: 0.0000015779978639\n",
      "Epoch: 17760/20000, Loss: 0.0000014553761503\n",
      "Epoch: 17770/20000, Loss: 0.0000028548927276\n",
      "Epoch: 17780/20000, Loss: 0.0000089708528321\n",
      "Epoch: 17790/20000, Loss: 0.0000027277446861\n",
      "Epoch: 17800/20000, Loss: 0.0000013152258589\n",
      "Epoch: 17810/20000, Loss: 0.0000012362316966\n",
      "Epoch: 17820/20000, Loss: 0.0000023533395961\n",
      "Epoch: 17830/20000, Loss: 0.0000081106554717\n",
      "Epoch: 17840/20000, Loss: 0.0000047310272748\n",
      "Epoch: 17850/20000, Loss: 0.0000021501302854\n",
      "Epoch: 17860/20000, Loss: 0.0000019753267679\n",
      "Epoch: 17870/20000, Loss: 0.0000022194665235\n",
      "Epoch: 17880/20000, Loss: 0.0000020316360860\n",
      "Epoch: 17890/20000, Loss: 0.0000062617118601\n",
      "Epoch: 17900/20000, Loss: 0.0000040891823119\n",
      "Epoch: 17910/20000, Loss: 0.0000027676494483\n",
      "Epoch: 17920/20000, Loss: 0.0000016841502202\n",
      "Epoch: 17930/20000, Loss: 0.0000010531331327\n",
      "Epoch: 17940/20000, Loss: 0.0000013831850083\n",
      "Epoch: 17950/20000, Loss: 0.0000071797617238\n",
      "Epoch: 17960/20000, Loss: 0.0000040250019993\n",
      "Epoch: 17970/20000, Loss: 0.0000062171575337\n",
      "Epoch: 17980/20000, Loss: 0.0000060750048760\n",
      "Epoch: 17990/20000, Loss: 0.0000017214193804\n",
      "Epoch: 18000/20000, Loss: 0.0000011523595731\n",
      "Epoch: 18010/20000, Loss: 0.0000011622945522\n",
      "Epoch: 18020/20000, Loss: 0.0000014289861383\n",
      "Epoch: 18030/20000, Loss: 0.0000052445425354\n",
      "Epoch: 18040/20000, Loss: 0.0000021211239982\n",
      "Epoch: 18050/20000, Loss: 0.0000024846260658\n",
      "Epoch: 18060/20000, Loss: 0.0000036719097807\n",
      "Epoch: 18070/20000, Loss: 0.0000018498465124\n",
      "Epoch: 18080/20000, Loss: 0.0000011083320715\n",
      "Epoch: 18090/20000, Loss: 0.0000015782347873\n",
      "Epoch: 18100/20000, Loss: 0.0000075574698712\n",
      "Epoch: 18110/20000, Loss: 0.0000059022199821\n",
      "Epoch: 18120/20000, Loss: 0.0000026782770419\n",
      "Epoch: 18130/20000, Loss: 0.0000017279614895\n",
      "Epoch: 18140/20000, Loss: 0.0000012783581269\n",
      "Epoch: 18150/20000, Loss: 0.0000015238637161\n",
      "Epoch: 18160/20000, Loss: 0.0000079501669461\n",
      "Epoch: 18170/20000, Loss: 0.0000016261744804\n",
      "Epoch: 18180/20000, Loss: 0.0000013040477143\n",
      "Epoch: 18190/20000, Loss: 0.0000009959381941\n",
      "Epoch: 18200/20000, Loss: 0.0000015347159206\n",
      "Epoch: 18210/20000, Loss: 0.0000157394315465\n",
      "Epoch: 18220/20000, Loss: 0.0000053591511460\n",
      "Epoch: 18230/20000, Loss: 0.0000015966530782\n",
      "Epoch: 18240/20000, Loss: 0.0000017388746301\n",
      "Epoch: 18250/20000, Loss: 0.0000050038265726\n",
      "Epoch: 18260/20000, Loss: 0.0000016399069409\n",
      "Epoch: 18270/20000, Loss: 0.0000011382520597\n",
      "Epoch: 18280/20000, Loss: 0.0000008379134897\n",
      "Epoch: 18290/20000, Loss: 0.0000008808900702\n",
      "Epoch: 18300/20000, Loss: 0.0000025805684345\n",
      "Epoch: 18310/20000, Loss: 0.0000098613245427\n",
      "Epoch: 18320/20000, Loss: 0.0000038212988329\n",
      "Epoch: 18330/20000, Loss: 0.0000016089434212\n",
      "Epoch: 18340/20000, Loss: 0.0000014347517663\n",
      "Epoch: 18350/20000, Loss: 0.0000021903858851\n",
      "Epoch: 18360/20000, Loss: 0.0000012653522390\n",
      "Epoch: 18370/20000, Loss: 0.0000015515332734\n",
      "Epoch: 18380/20000, Loss: 0.0000055509308368\n",
      "Epoch: 18390/20000, Loss: 0.0000110696391857\n",
      "Epoch: 18400/20000, Loss: 0.0000036994467791\n",
      "Epoch: 18410/20000, Loss: 0.0000023815775876\n",
      "Epoch: 18420/20000, Loss: 0.0000009700345345\n",
      "Epoch: 18430/20000, Loss: 0.0000007877777080\n",
      "Epoch: 18440/20000, Loss: 0.0000008305557344\n",
      "Epoch: 18450/20000, Loss: 0.0000039203996494\n",
      "Epoch: 18460/20000, Loss: 0.0000036239132442\n",
      "Epoch: 18470/20000, Loss: 0.0000012993169776\n",
      "Epoch: 18480/20000, Loss: 0.0000010400565316\n",
      "Epoch: 18490/20000, Loss: 0.0000008770336422\n",
      "Epoch: 18500/20000, Loss: 0.0000016247439589\n",
      "Epoch: 18510/20000, Loss: 0.0000101632995211\n",
      "Epoch: 18520/20000, Loss: 0.0000047621324484\n",
      "Epoch: 18530/20000, Loss: 0.0000018232851744\n",
      "Epoch: 18540/20000, Loss: 0.0000009167678741\n",
      "Epoch: 18550/20000, Loss: 0.0000008833067113\n",
      "Epoch: 18560/20000, Loss: 0.0000019802589577\n",
      "Epoch: 18570/20000, Loss: 0.0000049324144129\n",
      "Epoch: 18580/20000, Loss: 0.0000025092504075\n",
      "Epoch: 18590/20000, Loss: 0.0000071335139182\n",
      "Epoch: 18600/20000, Loss: 0.0000080956824604\n",
      "Epoch: 18610/20000, Loss: 0.0000026877337405\n",
      "Epoch: 18620/20000, Loss: 0.0000016029148355\n",
      "Epoch: 18630/20000, Loss: 0.0000009251924666\n",
      "Epoch: 18640/20000, Loss: 0.0000007207304407\n",
      "Epoch: 18650/20000, Loss: 0.0000007107477131\n",
      "Epoch: 18660/20000, Loss: 0.0000024534165277\n",
      "Epoch: 18670/20000, Loss: 0.0000123372446978\n",
      "Epoch: 18680/20000, Loss: 0.0000028162664876\n",
      "Epoch: 18690/20000, Loss: 0.0000011790069721\n",
      "Epoch: 18700/20000, Loss: 0.0000010570614677\n",
      "Epoch: 18710/20000, Loss: 0.0000008768820408\n",
      "Epoch: 18720/20000, Loss: 0.0000007883271564\n",
      "Epoch: 18730/20000, Loss: 0.0000022053179691\n",
      "Epoch: 18740/20000, Loss: 0.0000116146275104\n",
      "Epoch: 18750/20000, Loss: 0.0000052698219406\n",
      "Epoch: 18760/20000, Loss: 0.0000016507327700\n",
      "Epoch: 18770/20000, Loss: 0.0000011230290511\n",
      "Epoch: 18780/20000, Loss: 0.0000017229637024\n",
      "Epoch: 18790/20000, Loss: 0.0000124863681776\n",
      "Epoch: 18800/20000, Loss: 0.0000044108546717\n",
      "Epoch: 18810/20000, Loss: 0.0000013525312852\n",
      "Epoch: 18820/20000, Loss: 0.0000007782949751\n",
      "Epoch: 18830/20000, Loss: 0.0000007743455512\n",
      "Epoch: 18840/20000, Loss: 0.0000020911388674\n",
      "Epoch: 18850/20000, Loss: 0.0000047249031923\n",
      "Epoch: 18860/20000, Loss: 0.0000063272632360\n",
      "Epoch: 18870/20000, Loss: 0.0000034944814615\n",
      "Epoch: 18880/20000, Loss: 0.0000017199870399\n",
      "Epoch: 18890/20000, Loss: 0.0000008927316344\n",
      "Epoch: 18900/20000, Loss: 0.0000007972869867\n",
      "Epoch: 18910/20000, Loss: 0.0000029978236853\n",
      "Epoch: 18920/20000, Loss: 0.0000086329537226\n",
      "Epoch: 18930/20000, Loss: 0.0000046198329073\n",
      "Epoch: 18940/20000, Loss: 0.0000017299825004\n",
      "Epoch: 18950/20000, Loss: 0.0000009371461260\n",
      "Epoch: 18960/20000, Loss: 0.0000008672819831\n",
      "Epoch: 18970/20000, Loss: 0.0000027368128031\n",
      "Epoch: 18980/20000, Loss: 0.0000103986558315\n",
      "Epoch: 18990/20000, Loss: 0.0000042469296204\n",
      "Epoch: 19000/20000, Loss: 0.0000013343527598\n",
      "Epoch: 19010/20000, Loss: 0.0000007099442314\n",
      "Epoch: 19020/20000, Loss: 0.0000007115218636\n",
      "Epoch: 19030/20000, Loss: 0.0000017530463765\n",
      "Epoch: 19040/20000, Loss: 0.0000133119829115\n",
      "Epoch: 19050/20000, Loss: 0.0000046422960622\n",
      "Epoch: 19060/20000, Loss: 0.0000021030259632\n",
      "Epoch: 19070/20000, Loss: 0.0000010286911447\n",
      "Epoch: 19080/20000, Loss: 0.0000006976174518\n",
      "Epoch: 19090/20000, Loss: 0.0000011825495676\n",
      "Epoch: 19100/20000, Loss: 0.0000116489673019\n",
      "Epoch: 19110/20000, Loss: 0.0000033021997297\n",
      "Epoch: 19120/20000, Loss: 0.0000021635469238\n",
      "Epoch: 19130/20000, Loss: 0.0000012618444316\n",
      "Epoch: 19140/20000, Loss: 0.0000007990453810\n",
      "Epoch: 19150/20000, Loss: 0.0000006577403724\n",
      "Epoch: 19160/20000, Loss: 0.0000018116364799\n",
      "Epoch: 19170/20000, Loss: 0.0000065345675466\n",
      "Epoch: 19180/20000, Loss: 0.0000035535902043\n",
      "Epoch: 19190/20000, Loss: 0.0000021936982648\n",
      "Epoch: 19200/20000, Loss: 0.0000013082101304\n",
      "Epoch: 19210/20000, Loss: 0.0000012828362514\n",
      "Epoch: 19220/20000, Loss: 0.0000053802573348\n",
      "Epoch: 19230/20000, Loss: 0.0000024832343115\n",
      "Epoch: 19240/20000, Loss: 0.0000021191960968\n",
      "Epoch: 19250/20000, Loss: 0.0000047155026550\n",
      "Epoch: 19260/20000, Loss: 0.0000021986018055\n",
      "Epoch: 19270/20000, Loss: 0.0000018233483843\n",
      "Epoch: 19280/20000, Loss: 0.0000023106526896\n",
      "Epoch: 19290/20000, Loss: 0.0000098145510492\n",
      "Epoch: 19300/20000, Loss: 0.0000042202095756\n",
      "Epoch: 19310/20000, Loss: 0.0000014778017885\n",
      "Epoch: 19320/20000, Loss: 0.0000007957602293\n",
      "Epoch: 19330/20000, Loss: 0.0000008407171777\n",
      "Epoch: 19340/20000, Loss: 0.0000038015357404\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 19350/20000, Loss: 0.0000027889198009\n",
      "Epoch: 19360/20000, Loss: 0.0000042684732762\n",
      "Epoch: 19370/20000, Loss: 0.0000018303080651\n",
      "Epoch: 19380/20000, Loss: 0.0000011493191323\n",
      "Epoch: 19390/20000, Loss: 0.0000009181378005\n",
      "Epoch: 19400/20000, Loss: 0.0000013984010820\n",
      "Epoch: 19410/20000, Loss: 0.0000060800111896\n",
      "Epoch: 19420/20000, Loss: 0.0000034316826714\n",
      "Epoch: 19430/20000, Loss: 0.0000097583142633\n",
      "Epoch: 19440/20000, Loss: 0.0000028853994536\n",
      "Epoch: 19450/20000, Loss: 0.0000013719596836\n",
      "Epoch: 19460/20000, Loss: 0.0000009440599342\n",
      "Epoch: 19470/20000, Loss: 0.0000006719911880\n",
      "Epoch: 19480/20000, Loss: 0.0000005878994216\n",
      "Epoch: 19490/20000, Loss: 0.0000008298667922\n",
      "Epoch: 19500/20000, Loss: 0.0000097018182714\n",
      "Epoch: 19510/20000, Loss: 0.0000052573063840\n",
      "Epoch: 19520/20000, Loss: 0.0000026553161661\n",
      "Epoch: 19530/20000, Loss: 0.0000008541821330\n",
      "Epoch: 19540/20000, Loss: 0.0000014991303487\n",
      "Epoch: 19550/20000, Loss: 0.0000073324026744\n",
      "Epoch: 19560/20000, Loss: 0.0000016997441890\n",
      "Epoch: 19570/20000, Loss: 0.0000009300545116\n",
      "Epoch: 19580/20000, Loss: 0.0000008353007388\n",
      "Epoch: 19590/20000, Loss: 0.0000035898067381\n",
      "Epoch: 19600/20000, Loss: 0.0000036996532344\n",
      "Epoch: 19610/20000, Loss: 0.0000018701242652\n",
      "Epoch: 19620/20000, Loss: 0.0000012880390159\n",
      "Epoch: 19630/20000, Loss: 0.0000050755693337\n",
      "Epoch: 19640/20000, Loss: 0.0000027121252515\n",
      "Epoch: 19650/20000, Loss: 0.0000022984870611\n",
      "Epoch: 19660/20000, Loss: 0.0000016491965198\n",
      "Epoch: 19670/20000, Loss: 0.0000011025102822\n",
      "Epoch: 19680/20000, Loss: 0.0000018566548761\n",
      "Epoch: 19690/20000, Loss: 0.0000051887864174\n",
      "Epoch: 19700/20000, Loss: 0.0000015075062265\n",
      "Epoch: 19710/20000, Loss: 0.0000023607265121\n",
      "Epoch: 19720/20000, Loss: 0.0000017913636157\n",
      "Epoch: 19730/20000, Loss: 0.0000032760440263\n",
      "Epoch: 19740/20000, Loss: 0.0000040728705244\n",
      "Epoch: 19750/20000, Loss: 0.0000028659330837\n",
      "Epoch: 19760/20000, Loss: 0.0000010171985423\n",
      "Epoch: 19770/20000, Loss: 0.0000009969841130\n",
      "Epoch: 19780/20000, Loss: 0.0000028549848139\n",
      "Epoch: 19790/20000, Loss: 0.0000066118245741\n",
      "Epoch: 19800/20000, Loss: 0.0000021044056666\n",
      "Epoch: 19810/20000, Loss: 0.0000010559090242\n",
      "Epoch: 19820/20000, Loss: 0.0000034935133044\n",
      "Epoch: 19830/20000, Loss: 0.0000023567413336\n",
      "Epoch: 19840/20000, Loss: 0.0000012136750911\n",
      "Epoch: 19850/20000, Loss: 0.0000050187527449\n",
      "Epoch: 19860/20000, Loss: 0.0000026772754609\n",
      "Epoch: 19870/20000, Loss: 0.0000010826033758\n",
      "Epoch: 19880/20000, Loss: 0.0000010959485053\n",
      "Epoch: 19890/20000, Loss: 0.0000008295543807\n",
      "Epoch: 19900/20000, Loss: 0.0000019715910184\n",
      "Epoch: 19910/20000, Loss: 0.0000073660025919\n",
      "Epoch: 19920/20000, Loss: 0.0000045530487114\n",
      "Epoch: 19930/20000, Loss: 0.0000014547633782\n",
      "Epoch: 19940/20000, Loss: 0.0000012743635125\n",
      "Epoch: 19950/20000, Loss: 0.0000040504487515\n",
      "Epoch: 19960/20000, Loss: 0.0000031684269288\n",
      "Epoch: 19970/20000, Loss: 0.0000020736217721\n",
      "Epoch: 19980/20000, Loss: 0.0000022221956897\n",
      "Epoch: 19990/20000, Loss: 0.0000018572134195\n",
      "Epoch: 20000/20000, Loss: 0.0000012751842178\n"
     ]
    }
   ],
   "source": [
    "# Create LEM instance\n",
    "lem = LEM(input_size, hidden_size, output_size, dt=0.7)\n",
    "\n",
    "# Loss and optimizer\n",
    "criterion = nn.MSELoss()\n",
    "optimizer = torch.optim.Adam(lem.parameters(), lr=0.001)\n",
    "\n",
    "# Training loop\n",
    "for epoch in range(num_epochs):\n",
    "    # Forward pass\n",
    "    output = lem(input_tensor)\n",
    "    loss = criterion(output, target_tensor)\n",
    "\n",
    "    # Backward and optimize\n",
    "    optimizer.zero_grad()\n",
    "    loss.backward()\n",
    "    optimizer.step()\n",
    "\n",
    "    # Print progress\n",
    "    if (epoch + 1) % 10 == 0:\n",
    "        print(f'Epoch: {epoch + 1}/{num_epochs}, Loss: {loss.item():.16f}')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "1da66d64",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([1, 1, 256])\n",
      "torch.Size([1, 20, 256])\n"
     ]
    }
   ],
   "source": [
    "print(test_tensor.shape)\n",
    "prediction_tensor = torch.zeros(1, 20, 256).float()\n",
    "print(prediction_tensor.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "a0543daa",
   "metadata": {},
   "outputs": [],
   "source": [
    "with torch.no_grad():\n",
    "    prediction = lem(test_tensor)\n",
    "    prediction = prediction.view(1, 1, 256).float()\n",
    "    prediction_tensor[:, 0, :] = prediction\n",
    "    for i in range(19):\n",
    "        prediction = lem(prediction)\n",
    "        prediction = prediction.view(1, 1, 256).float()\n",
    "        prediction_tensor[:, i+1, :] = prediction\n",
    "        "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e6b9bad",
   "metadata": {},
   "source": [
    "### Four different types of error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9c33b0f5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Exact Solution\n",
    "\n",
    "u_test = u_1.T\n",
    "u_test_full = u_test[80:100, :]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "00c8fa22",
   "metadata": {},
   "outputs": [],
   "source": [
    "prediction_tensor = torch.squeeze(prediction_tensor)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "334bf0be",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "torch.Size([20, 256])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Extrapolation\n",
    "\n",
    "k1 = ( prediction_tensor - u_test_full)**2\n",
    "u_test_full_tensor = torch.tensor(u_test_full**2)\n",
    "u_test_full_tensor.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "01080c4f",
   "metadata": {},
   "source": [
    "### L^2 norm error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "33c17bd8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Relative Error Test:  0.05983429715206502 %\n"
     ]
    }
   ],
   "source": [
    "# Compute the relative L2 error norm (generalization error)\n",
    "relative_error_test = torch.mean(k1)/ torch.mean(u_test_full_tensor)\n",
    "\n",
    "print(\"Relative Error Test: \", relative_error_test.item(), \"%\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "5f980cfe",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (4209523232.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  File \u001b[0;32m\"/tmp/ipykernel_23917/4209523232.py\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m    2+\u001b[0m\n\u001b[0m      ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "2+"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fa3fa35b",
   "metadata": {},
   "source": [
    "### Max absolute norm error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "01cf8637",
   "metadata": {},
   "outputs": [],
   "source": [
    "R_abs = torch.max(torch.abs(prediction_tensor - u_test_full))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b3e65482",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(R_abs)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "678810f2",
   "metadata": {},
   "source": [
    "### Explained variance score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "02c72385",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "\n",
    "a = prediction_tensor\n",
    "b = u_test_full\n",
    "# Assuming 'a' is your predicted values (model's predictions) and 'b' is the true values (ground truth)\n",
    "# Make sure 'a' and 'b' are PyTorch tensors\n",
    "# a = torch.tensor(a)\n",
    "b = torch.tensor(b)\n",
    "# Calculate the mean of 'b'\n",
    "mean_b = torch.mean(b)\n",
    "\n",
    "# Calculate the Explained Variance Score\n",
    "numerator = torch.var(b - a)  # Variance of the differences between 'b' and 'a'\n",
    "denominator = torch.var(b)    # Variance of 'b'\n",
    "evs = 1 - numerator / denominator\n",
    "\n",
    "print(\"Explained Variance Score:\", evs.item())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f664baf6",
   "metadata": {},
   "source": [
    "### Mean absolute error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43fc2394",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Compute the relative L2 error norm (generalization error)\n",
    "relative_error_test = torch.mean(torch.abs(prediction_tensor - u_test_full))\n",
    "\n",
    "print(\"Relative Error Test: \", relative_error_test, \"%\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "75e50e9e",
   "metadata": {},
   "source": [
    "### Contour plot for PINN (80 percent) and (20 percentage lem prediction)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8e3eec75",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(prediction_tensor.shape)\n",
    "prediction_tensor = torch.squeeze(prediction_tensor)\n",
    "input_tensor = torch.squeeze(input_tensor)\n",
    "\n",
    "conc_u = torch.squeeze(input_tensor)\n",
    "concatenated_tensor = torch.cat((conc_u, prediction_tensor), dim=0)\n",
    "\n",
    "x1 = np.linspace(-1, 1, 256)\n",
    "t1 = np.linspace(0, 1, 99)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e393a1e0",
   "metadata": {},
   "source": [
    "### Snapshot time plots"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "04f91104",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import torch\n",
    "\n",
    "# Create the figure and axis objects with reduced width\n",
    "fig, ax = plt.subplots(figsize=(5, 5))  # You can adjust the width (7 inches) and height (5 inches) as needed\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "final_time_output = prediction_tensor[3, :]\n",
    "final_out = final_time_output.detach().numpy().reshape(-1, 1)\n",
    "final_true = u_1[:, 83].reshape(-1, 1)\n",
    "\n",
    "# Plot the data with red and blue lines, one with dotted and one with solid style\n",
    "ax.plot(x, final_out, color='red', linestyle='dotted', linewidth=12, label='Prediction')\n",
    "ax.plot(x, final_true, color='blue', linestyle='solid', linewidth=7, label='True')\n",
    "\n",
    "\n",
    "# Set the axis labels with bold font weight\n",
    "ax.set_xlabel(r\"${x}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "ax.set_ylabel(r\"${u(x, t)}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "\n",
    "# Set the title with bold font weight\n",
    "ax.set_title(r\"${t = 0.83}$\", fontsize=26, color='black', fontweight='bold')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 3\n",
    "ax.set_xticks([-1, 0, 1])\n",
    "ax.set_yticks([-1, 0, 1])\n",
    "\n",
    "# Set tick labels fontweight to bold and increase font size\n",
    "ax.tick_params(axis='both', which='major', labelsize=20, width=2, length=10)\n",
    "\n",
    "# # Set the fontweight for tick labels to bold\n",
    "# for tick in ax.get_xticklabels() + ax.get_yticklabels():\n",
    "#     tick.set_weight('bold')\n",
    "\n",
    "# Set the spines linewidth to bold\n",
    "ax.spines['top'].set_linewidth(2)\n",
    "ax.spines['right'].set_linewidth(2)\n",
    "ax.spines['bottom'].set_linewidth(2)\n",
    "ax.spines['left'].set_linewidth(2)\n",
    "\n",
    "# Set the legend\n",
    "# ax.legend()\n",
    "\n",
    "plt.savefig('LEM_0.83_20.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "#plt.savefig('lem_0.83_20.png', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3d96305e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import torch\n",
    "\n",
    "# Create the figure and axis objects with reduced width\n",
    "fig, ax = plt.subplots(figsize=(5, 5))  # You can adjust the width (7 inches) and height (5 inches) as needed\n",
    "\n",
    "\n",
    "\n",
    "final_time_output = prediction_tensor[-2, :]\n",
    "final_out = final_time_output.detach().numpy().reshape(-1, 1)\n",
    "final_true = u_1[:, -2].reshape(-1, 1)\n",
    "\n",
    "# Plot the data with red and blue lines, one with dotted and one with solid style\n",
    "ax.plot(x, final_out, color='red', linestyle='dotted', linewidth=12, label='Prediction')\n",
    "ax.plot(x, final_true, color='blue', linestyle='solid', linewidth=7, label='True')\n",
    "\n",
    "\n",
    "# Set the axis labels with bold font weight\n",
    "ax.set_xlabel(r\"${x}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "ax.set_ylabel(r\"${u(x, t)}$\", fontsize=26, color='black', fontdict={'weight': 'bold'})\n",
    "\n",
    "# Set the title with bold font weight\n",
    "ax.set_title(r\"${t = 0.98}$\", fontsize=26, color='black', fontweight='bold')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 3\n",
    "ax.set_xticks([-1, 0, 1])\n",
    "ax.set_yticks([-1, 0, 1])\n",
    "\n",
    "# Set tick labels fontweight to bold and increase font size\n",
    "ax.tick_params(axis='both', which='major', labelsize=20, width=2, length=10)\n",
    "\n",
    "# # Set the fontweight for tick labels to bold\n",
    "# for tick in ax.get_xticklabels() + ax.get_yticklabels():\n",
    "#     tick.set_weight('bold')\n",
    "\n",
    "# Set the spines linewidth to bold\n",
    "ax.spines['top'].set_linewidth(2)\n",
    "ax.spines['right'].set_linewidth(2)\n",
    "ax.spines['bottom'].set_linewidth(2)\n",
    "ax.spines['left'].set_linewidth(2)\n",
    "\n",
    "# Set the legend\n",
    "# ax.legend()\n",
    "\n",
    "plt.savefig('LEM_0.98_20.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "#plt.savefig('lem_0.98_20.png', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d962cd38",
   "metadata": {},
   "source": [
    "### Contour plot where 80 percent for PINN solution and 20 percent for lem solution"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5011fef9",
   "metadata": {},
   "source": [
    "### Exact contour"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d6ac2bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib.ticker import FixedLocator\n",
    "\n",
    "# Assuming you have defined concatenated_tensor as a PyTorch tensor\n",
    "# concatenated_tensor = torch.cat((tensor1, tensor2), dim=0)\n",
    "\n",
    "# Convert concatenated_tensor to a NumPy array\n",
    "concatenated_array = u_1.T\n",
    "\n",
    "# Define custom color levels\n",
    "x = np.linspace(-1, 1, concatenated_array.shape[1])  # Replace 0 and 1 with your actual x range\n",
    "t = np.linspace(0, 1, concatenated_array.shape[0])  # Replace 0 and 1 with your actual t range\n",
    "X, T = np.meshgrid(x, t)\n",
    "\n",
    "# Define custom color levels using the minimum and maximum from the NumPy array\n",
    "c_levels = np.linspace(np.min(concatenated_array), np.max(concatenated_array), 400)\n",
    "\n",
    "# Plot the contour with interpolated data\n",
    "plt.figure(figsize=(20, 5))\n",
    "plt.pcolormesh(T, X, concatenated_array, shading='auto', cmap='coolwarm')\n",
    "\n",
    "# Set the fontweight for axis labels to regular (not bold)\n",
    "plt.xlabel(\"$t$\", fontsize=26)\n",
    "plt.ylabel(\"$x$\", fontsize=26)\n",
    "plt.title(\"$u(x, t)$\", fontsize=26)\n",
    "\n",
    "# Set tick labels fontweight to regular (not bold) and increase font size\n",
    "plt.tick_params(axis='both', which='major', labelsize=20, width=3, length=10)\n",
    "\n",
    "# Set the fontweight for tick labels to regular (not bold)\n",
    "for tick in plt.gca().get_xticklabels() + plt.gca().get_yticklabels():\n",
    "    tick.set_weight('normal')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 5\n",
    "num_ticks = 5\n",
    "x_ticks = np.linspace(np.min(T), np.max(T), num_ticks)\n",
    "y_ticks = np.linspace(np.min(X), np.max(X), num_ticks)\n",
    "\n",
    "plt.gca().xaxis.set_major_locator(FixedLocator(x_ticks))\n",
    "plt.gca().yaxis.set_major_locator(FixedLocator(y_ticks))\n",
    "\n",
    "cbar1 = plt.colorbar()\n",
    "# Set the number of ticks for the color bar with uniformly distributed numbers\n",
    "num_ticks = 5\n",
    "c_ticks = np.linspace(np.min(concatenated_array), np.max(concatenated_array), num_ticks)\n",
    "cbar1.set_ticks(c_ticks)\n",
    "\n",
    "# Set the fontweight and fontsize for color bar tick labels\n",
    "for t in cbar1.ax.get_yticklabels():\n",
    "    t.set_weight('normal')\n",
    "    t.set_fontsize(26)  # Increase the font size for color bar tick labels\n",
    "\n",
    "# Increase the size of numbers on axis and color bar\n",
    "plt.xticks(fontsize=26)\n",
    "plt.yticks(fontsize=26)\n",
    "\n",
    "# Increase the tick size and width of the color bar\n",
    "cbar1.ax.tick_params(axis='both', which='major', labelsize=30, width=3,  length=10)\n",
    "\n",
    "#plt.savefig('Contour_Exact.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "plt.savefig('contour_exact.jpeg', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c034dcf7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib.ticker import FixedLocator\n",
    "\n",
    "# Assuming you have defined concatenated_tensor as a PyTorch tensor\n",
    "# concatenated_tensor = torch.cat((tensor1, tensor2), dim=0)\n",
    "\n",
    "# Convert concatenated_tensor to a NumPy array\n",
    "concatenated_array = concatenated_tensor.numpy()\n",
    "\n",
    "# Define custom color levels\n",
    "x = np.linspace(-1, 1, concatenated_array.shape[1])  # Replace 0 and 1 with your actual x range\n",
    "t = np.linspace(0, 1, concatenated_array.shape[0])  # Replace 0 and 1 with your actual t range\n",
    "X, T = np.meshgrid(x, t1)\n",
    "\n",
    "# Define custom color levels using the minimum and maximum from the NumPy array\n",
    "c_levels = np.linspace(np.min(concatenated_array), np.max(concatenated_array), 400)\n",
    "\n",
    "# Plot the contour with interpolated data\n",
    "plt.figure(figsize=(20, 5))\n",
    "plt.pcolormesh(T, X, concatenated_array, shading='auto', cmap='coolwarm')\n",
    "\n",
    "# Set the fontweight for axis labels to regular (not bold)\n",
    "plt.xlabel(\"$t$\", fontsize=26)\n",
    "plt.ylabel(\"$x$\", fontsize=26)\n",
    "plt.title(\"$u(x, t)$\", fontsize=26)\n",
    "\n",
    "# Set tick labels fontweight to regular (not bold) and increase font size\n",
    "plt.tick_params(axis='both', which='major', labelsize=20, width=3, length=10)\n",
    "\n",
    "# Set the fontweight for tick labels to regular (not bold)\n",
    "for tick in plt.gca().get_xticklabels() + plt.gca().get_yticklabels():\n",
    "    tick.set_weight('normal')\n",
    "\n",
    "# Set the number of ticks for x-axis and y-axis to 5\n",
    "num_ticks = 5\n",
    "x_ticks = np.linspace(np.min(T), np.max(T), num_ticks)\n",
    "y_ticks = np.linspace(np.min(X), np.max(X), num_ticks)\n",
    "\n",
    "plt.gca().xaxis.set_major_locator(FixedLocator(x_ticks))\n",
    "plt.gca().yaxis.set_major_locator(FixedLocator(y_ticks))\n",
    "\n",
    "cbar1 = plt.colorbar()\n",
    "# Set the number of ticks for the color bar with uniformly distributed numbers\n",
    "num_ticks = 5\n",
    "c_ticks = np.linspace(np.min(concatenated_array), np.max(concatenated_array), num_ticks)\n",
    "cbar1.set_ticks(c_ticks)\n",
    "\n",
    "# Set the fontweight and fontsize for color bar tick labels\n",
    "for t in cbar1.ax.get_yticklabels():\n",
    "    t.set_weight('normal')\n",
    "    t.set_fontsize(26)  # Increase the font size for color bar tick labels\n",
    "\n",
    "# Increase the size of numbers on axis and color bar\n",
    "plt.xticks(fontsize=26)\n",
    "plt.yticks(fontsize=26)\n",
    "\n",
    "# Increase the tick size and width of the color bar\n",
    "cbar1.ax.tick_params(axis='both', which='major', labelsize=30, width=3,  length=10)\n",
    "\n",
    "# Add a dotted line at t = 0.8\n",
    "plt.axvline(x=0.8, color='black', linestyle='dotted', linewidth=5)\n",
    "\n",
    "#plt.savefig('Contour_LEM_20.pdf', dpi=500, bbox_inches=\"tight\")\n",
    "plt.savefig('contour_LEM_20.jpeg', dpi=500, bbox_inches=\"tight\")\n",
    "# Show the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b7ab04a2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
